McpToolsOptions
Defined in: agents/src/mcp.ts:79
Where the server is. Streamable HTTP only.
Extends
Section titled “Extends”Properties
Section titled “Properties”allow: Readonly<Record<string, McpToolPolicy>>;Defined in: agents/src/mcp.ts:83
The tools the model may call, by their name on the server. No other tool reaches it.
fetch?
Section titled “fetch?”optional fetch?: (url, init?) => Promise<Response>;Defined in: agents/src/mcp.ts:51
Replaces the global fetch: a proxy, a service binding, a test.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
url |
string | URL |
init? |
RequestInit |
Returns
Section titled “Returns”Promise<Response>
Inherited from
Section titled “Inherited from”optional key?: string;Defined in: agents/src/mcp.ts:49
Sent as Authorization: Bearer <key>, with surrounding spaces removed before sending and
redacting. Tool metadata containing the key is refused.
Inherited from
Section titled “Inherited from”prefix?
Section titled “prefix?”optional prefix?: string;Defined in: agents/src/mcp.ts:85
Goes before every name with _: prefix “docs” turns “search” into “docs_search”.
recorded
Section titled “recorded”recorded: readonly McpToolRecord[];Defined in: agents/src/mcp.ts:81
The server’s tools as listMcpTools returned them.
timeoutMs?
Section titled “timeoutMs?”optional timeoutMs?: number;Defined in: agents/src/mcp.ts:53
How long one call may take, connecting included, in ms. Default 60000.
Inherited from
Section titled “Inherited from”url: string;Defined in: agents/src/mcp.ts:44
The server’s Streamable HTTP endpoint, such as https://docs.example.com/mcp.
Inherited from
Section titled “Inherited from”optional wrap?: (text, tool) => string;Defined in: agents/src/mcp.ts:87
Rewrites server text before the model reads it, for example to fence it as untrusted data.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
text |
string |
tool |
string |
Returns
Section titled “Returns”string