Skip to content
providerkit
GitHub

McpToolPolicy

Defined in: agents/src/mcp.ts:57

What the app decides about one allowed tool.

optional description?: string;

Defined in: agents/src/mcp.ts:59

What the model reads instead of the recorded description.


optional needsApproval?: boolean;

Defined in: agents/src/mcp.ts:69

Ask a person before each call. A tool the server does not mark read-only must set this: true to ask, or false to let it run without asking.


optional pin?: Record<string, unknown>;

Defined in: agents/src/mcp.ts:64

Arguments the app fixes. They leave the schema the model sees and are always sent; a model that sends one anyway gets the call refused as invalid input.


optional readOnly?: false;

Defined in: agents/src/mcp.ts:74

Treat a tool its server marks read-only as one that can change data. There is no true: only the server’s readOnlyHint makes a tool read-only.


optional timeoutMs?: number;

Defined in: agents/src/mcp.ts:76

Replaces the server-wide timeoutMs for this tool.