ENF News Bot
Automated News Bot
- Joined
- Apr 15, 2022
- Messages
- 2,591
This release reduces repeated MCP schema conversion and adds an opt-out for Think's automatic MCP tool exposure. It also lets non-AI-SDK hosts invoke the durable Code Mode runtime directly.
Agents SDK MCP clients now reuse converted input and output schemas while a live connection keeps the same tool catalog. This avoids converting every MCP JSON Schema to Zod again for each model turn.
This setting skips Think's automatic
Use
Search and describe results include
For setup and exact method types, refer to Create a durable Code Mode runtime and the Code Mode API reference.
npmyarnpnpmbun
Continue reading...
Control direct MCP tool exposure in Think
https://developers.cloudflare.com/changelog/rss/#control-direct-mcp-tool-exposure-in-thinkAgents SDK MCP clients now reuse converted input and output schemas while a live connection keeps the same tool catalog. This avoids converting every MCP JSON Schema to Zod again for each model turn.
@cloudflare/think also adds includeMcpTools. Set it to false when you expose MCP tools through Code Mode or another mechanism outside Think's automatic tool set:
Code:
import { Think } from "@cloudflare/think";
export class MyAgent extends Think {
includeMcpTools = false;
waitForMcpConnections = true;
}
Code:
import { Think } from "@cloudflare/think";
export class MyAgent extends Think<Env> {
includeMcpTools = false;
waitForMcpConnections = true;
}
This setting skips Think's automatic
getAITools() call. MCP registration, restoration, discovery, raw catalog access, direct calls, and Code Mode connectors continue to work.Use
listTools() when you only need the raw MCP catalog. For connector setup, refer to Use MCP tools with Code Mode.Invoke the Code Mode runtime without the AI SDK
https://developers.cloudflare.com/changelog/rss/#invoke-the-code-mode-runtime-without-the-ai-sdk@cloudflare/codemode@latest adds execute(), search(), and describe() to the durable runtime handle. MCP servers and other hosts can now execute code and discover connector methods without adapting the runtime to an AI SDK tool.
Code:
const matches = await runtime.search("create issue");
const docs = await runtime.describe(matches.results[0].path);
const outcome = await runtime.execute({
code: `async () => github.create_issue({ title: "Bug" })`,
});
Code:
const matches = await runtime.search("create issue");
const docs = await runtime.describe(matches.results[0].path);
const outcome = await runtime.execute({
code: `async () => github.create_issue({ title: "Bug" })`,
});
Search and describe results include
requiresApproval: true for protected connector methods. Resolve a paused execution with the existing approve() and reject() methods.For setup and exact method types, refer to Create a durable Code Mode runtime and the Code Mode API reference.
Upgrade
https://developers.cloudflare.com/changelog/rss/#upgradenpmyarnpnpmbun
npm i agents@latest @cloudflare/think@latest @cloudflare/codemode@latestyarn add agents@latest @cloudflare/think@latest @cloudflare/codemode@latestpnpm add agents@latest @cloudflare/think@latest @cloudflare/codemode@latestbun add agents@latest @cloudflare/think@latest @cloudflare/codemode@latestContinue reading...