Skip to content

[Agents] Document MCP and Code Mode SDK updates#32180

Merged
mattzcarey merged 1 commit into
productionfrom
docs/agents-mcp-tool-materialization
Jul 22, 2026
Merged

[Agents] Document MCP and Code Mode SDK updates#32180
mattzcarey merged 1 commit into
productionfrom
docs/agents-mcp-tool-materialization

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Documents two Agents SDK updates in one changelog entry:

  • MCP schema conversion caching and Think.includeMcpTools from cloudflare/agents#1959
  • framework-neutral execute(), search(), and describe() Code Mode runtime APIs from cloudflare/agents#1969, available in @cloudflare/codemode@latest

Updates the Think, MCP client, Code Mode runtime, and Code Mode API reference pages. Search and describe documentation also covers the new requiresApproval result metadata.

Fixes the documentation gap tracked by cloudflare/agents#1938.

Documentation checklist

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/product-owners
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @cloudflare/product-owners, @cloudflare/ai-agents, @cloudflare/dev-plat-leads

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Preview URL: https://180732ab.preview.developers.cloudflare.com
Preview Branch URL: https://docs-agents-mcp-tool-materialization.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/changelog/post/2026-07-22-mcp-codemode-updates/ https://docs-agents-mcp-tool-materialization.preview.developers.cloudflare.com/changelog/post/2026-07-22-mcp-codemode-updates/
https://developers.cloudflare.com/agents/tools/codemode/durable-runtime/ https://docs-agents-mcp-tool-materialization.preview.developers.cloudflare.com/agents/tools/codemode/durable-runtime/
https://developers.cloudflare.com/agents/harnesses/think/tools/ https://docs-agents-mcp-tool-materialization.preview.developers.cloudflare.com/agents/harnesses/think/tools/
https://developers.cloudflare.com/agents/model-context-protocol/apis/client-api/ https://docs-agents-mcp-tool-materialization.preview.developers.cloudflare.com/agents/model-context-protocol/apis/client-api/
https://developers.cloudflare.com/agents/tools/codemode/mcp/ https://docs-agents-mcp-tool-materialization.preview.developers.cloudflare.com/agents/tools/codemode/mcp/
https://developers.cloudflare.com/agents/tools/codemode/api-reference/ https://docs-agents-mcp-tool-materialization.preview.developers.cloudflare.com/agents/tools/codemode/api-reference/
https://developers.cloudflare.com/agents/harnesses/think/configuration/ https://docs-agents-mcp-tool-materialization.preview.developers.cloudflare.com/agents/harnesses/think/configuration/

@mattzcarey
mattzcarey force-pushed the docs/agents-mcp-tool-materialization branch from dedf2ff to ca9c15c Compare July 21, 2026 14:33
@mattzcarey
mattzcarey marked this pull request as ready for review July 21, 2026 15:41
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 1 warning, 💡 1 suggestion found in commit 180732a.

👉 Fix in your agent 👈
Fix the following review findings in PR #32180 (https://github.com/cloudflare/cloudflare-docs/pull/32180).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
  or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.

---

## Code Review

### Warnings (1)

#### CR-e34ecdaaa4b5 · Unchecked search result access
- **File:** `src/content/docs/agents/tools/codemode/durable-runtime.mdx` line 246
- **Issue:** The example does `const method = matches.results[0];` without verifying that `search()` returned any results. If no method matches, `method` is `undefined` and the next line `runtime.describe(method.path)` throws.
- **Fix:** Guard the access with a check such as `if (matches.results.length === 0) { /* handle no match */ }` before dereferencing the first result.

---

## Style Guide Review

### Suggestions (1)

#### SG-88a7fe39d425 · Use TypeScriptExample for raw TypeScript code blocks
- **File:** `src/content/docs/agents/model-context-protocol/apis/client-api.mdx` line 1155
- **Issue:** Added a raw ```ts fenced block in a docs MDX file
- **Fix:** Wrap the TypeScript snippet in <TypeScriptExample> instead of using a bare fence

Code Review

This code review is in beta and may not always be helpful — use your judgment.

Warnings (1)
File Issue
agents/tools/codemode/durable-runtime.mdx line 246 Unchecked search result access — The example does const method = matches.results[0]; without verifying that search() returned any results. If no method matches, method is undefined and the next line runtime.describe(method.path) throws. Fix: Guard the access with a check such as if (matches.results.length === 0) { /\* handle no match \*/ } before dereferencing the first result.

Conventions

No convention issues found.

Style Guide Review

Suggestions (1)
File Issue
agents/model-context-protocol/apis/client-api.mdx line 1155 Use TypeScriptExample for raw TypeScript code blocks — Added a raw ```ts fenced block in a docs MDX file Fix: Wrap the TypeScript snippet in instead of using a bare fence
Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

@mattzcarey
mattzcarey force-pushed the docs/agents-mcp-tool-materialization branch from ca9c15c to 7f70877 Compare July 22, 2026 14:55
@mattzcarey mattzcarey changed the title [Agents] Document MCP tool schema conversion [Agents] Document MCP and Code Mode SDK updates Jul 22, 2026
@mattzcarey
mattzcarey force-pushed the docs/agents-mcp-tool-materialization branch from 7f70877 to 4823b69 Compare July 22, 2026 15:01
Comment thread src/content/docs/agents/tools/codemode/api-reference.mdx Outdated
@mattzcarey
mattzcarey force-pushed the docs/agents-mcp-tool-materialization branch from 4823b69 to cb90226 Compare July 22, 2026 15:02
Comment thread src/content/docs/agents/tools/codemode/durable-runtime.mdx Outdated
@mattzcarey
mattzcarey force-pushed the docs/agents-mcp-tool-materialization branch from cb90226 to f998df7 Compare July 22, 2026 15:08
Comment thread src/content/changelog/agents/2026-07-22-mcp-codemode-updates.mdx Outdated
Comment thread src/content/changelog/agents/2026-07-22-mcp-codemode-updates.mdx Outdated
@mattzcarey
mattzcarey force-pushed the docs/agents-mcp-tool-materialization branch from f998df7 to 180732a Compare July 22, 2026 16:33
@mattzcarey
mattzcarey enabled auto-merge (squash) July 22, 2026 16:33
@mattzcarey
mattzcarey merged commit cb6cbfa into production Jul 22, 2026
13 checks passed
@mattzcarey
mattzcarey deleted the docs/agents-mcp-tool-materialization branch July 22, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:changelog size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants