DropletMCPTool

One action a droplet offers to AI apps through Droppy's MCP server.

struct DropletMCPTool

DropletMCPTool(
    name: "add_city",
    title: "Add a city",
    summary: "Adds a city to World Clock. Takes {\"city\": \"Lisbon\"}.",
    inputSchemaJSON: #"{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}"#
)

Initializers

init(name:title:summary:inputSchemaJSON:isDestructive:)

init(name: String, title: String, summary: String, inputSchemaJSON: String = "{\"type\":\"object\"}", isDestructive: Bool = false)

Creates a tool description.

Properties

inputSchemaJSON

let inputSchemaJSON: String

A JSON Schema object describing the arguments, as JSON text. {"type":"object"} (the default) takes no arguments.

isDestructive

let isDestructive: Bool

True when the tool deletes or overwrites something the user cannot get back. Droppy then asks the user before every call, and lists the tool only while "Delete and clear items" is allowed too.

name

let name: String

The tool's name within your droplet: a lowercase letter, then up to 31 lowercase letters, digits and underscores (add_city). Unique within the droplet. Droppy lists it to AI apps as droplet_<your id>_<name>, shortened with a hash when that is longer than 48 characters.

summary

let summary: String

What the tool does and what it returns, in a sentence or two. This is what the model reads to decide when to call it, so be specific.

title

let title: String

A short title in sentence case, shown in Droppy's activity log and in the question Droppy asks before a destructive tool.