diff --git a/docs/specification/draft/server/tools.md b/docs/specification/draft/server/tools.md index 8e061b974..c3dc79fa9 100644 --- a/docs/specification/draft/server/tools.md +++ b/docs/specification/draft/server/tools.md @@ -30,6 +30,7 @@ Applications **SHOULD**: - Insert clear visual indicators when tools are invoked - Present confirmation prompts to the user for operations, to ensure a human is in the loop {{< /callout >}} +- Always present a confirmation prompt to the user when invoking a sensitive operation ## Capabilities @@ -79,6 +80,7 @@ To discover available tools, clients send a `tools/list` request. This operation { "name": "get_weather", "description": "Get current weather information for a location", + "sensitive": false, "inputSchema": { "type": "object", "properties": { @@ -181,6 +183,8 @@ A tool definition includes: - `name`: Unique identifier for the tool - `description`: Human-readable description of functionality - `inputSchema`: JSON Schema defining expected parameters +- `sensitive`: A boolean flag that indicates whether the tool performs a sensitive + operation. ### Tool Result @@ -291,6 +295,9 @@ Example tool execution error: - Prompt for user confirmation on sensitive operations - Show tool inputs to the user before calling the server, to avoid malicious or accidental data exfiltration + - For any tool with `sensitive` set to true, explicitly prompt the user to confirm the + operation. The confirmation UI SHOULD clearly indicate the tool’s purpose, the + inputs provided, and any potential impact of the operation. - Validate tool results before passing to LLM - Implement timeouts for tool calls - Log tool usage for audit purposes diff --git a/schema/draft/schema.json b/schema/draft/schema.json index 1f91ad461..95fbb35d9 100644 --- a/schema/draft/schema.json +++ b/schema/draft/schema.json @@ -2057,6 +2057,10 @@ "name": { "description": "The name of the tool.", "type": "string" + }, + "sensitive": { + "description": "Indicates whether invoking this tool performs a sensitive operation. Defaults to false if not specified.", + "type": "boolean" } }, "required": [ diff --git a/schema/draft/schema.ts b/schema/draft/schema.ts index 020704966..eaf12f0bb 100644 --- a/schema/draft/schema.ts +++ b/schema/draft/schema.ts @@ -697,6 +697,10 @@ export interface Tool { properties?: { [key: string]: object }; required?: string[]; }; + /** + * Indicates whether invoking this tool performs a sensitive operation. Defaults to false if not specified. + */ + sensitive?: boolean; } /* Logging */