fastmcp/docs
Adam Azzam b9153404f4
Add experimental CodeMode transform (#3297)
* code mode

* update uv.lock for monty optional dep

🤖 Generated with Claude Code

* retry CI

* Address PR review comments on CodeMode transform

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix ty unresolved-attribute error on search_helper

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* more idiomacy

* harden

* fix docs

* harden

* fix red CI

* Refactor CodeMode to use CatalogTransform base class

Removes the duplicate ContextVar bypass pattern in favor of the shared
CatalogTransform machinery. Also fixes a pre-existing bug where
`from __future__ import annotations` caused NameError for Annotated
in nested function scopes at runtime.

* Remove redundant _get_visible_tools wrapper in CodeMode

* Rewrite CodeMode docs with proper motivation and structure

* Fix type narrowing in collision test

* Stop unwrapping tool results in CodeMode's call_tool

call_tool() inside execute blocks now returns structured content as-is,
preserving the {"result": value} wrapping. This means the output schema
shown in search results accurately describes what call_tool() returns,
so LLMs can trust the schema when writing code.

Also adds examples/code_mode/ with a server and narrated client demo.

* Simplify call_tool return type: dict | str

* Fix example client to unwrap structured results

* Let server resolve tool versions instead of pinning first match

* Rewrite CodeMode docs to match current behavior

* Rename optional extra from monty to code-mode

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2026-02-27 12:14:03 -05:00
..
.cursor/rules Clean up parameter documentation 2025-06-22 20:59:53 -04:00
apps Reorganize docs navigation around Server/Client/Apps pillars (#3197) 2026-02-16 15:33:16 -05:00
assets Animated (#3231) 2026-02-19 11:56:51 -05:00
clients Normalize repo references to PrefectHQ/fastmcp casing (#3218) 2026-02-18 14:51:18 -05:00
community Normalize repo references to PrefectHQ/fastmcp casing (#3218) 2026-02-18 14:51:18 -05:00
css fix: remove position override from docs banner CSS (#3282) 2026-02-23 11:26:48 -05:00
deployment Pin httpx < 1.0 and simplify beta install docs (#2975) 2026-01-21 21:08:46 -05:00
development Normalize repo references to PrefectHQ/fastmcp casing (#3218) 2026-02-18 14:51:18 -05:00
getting-started Document mounted server state store isolation in upgrade guide (#3236) 2026-02-19 12:05:50 -05:00
integrations Add JWT audience validation and RFC 8707 warnings to auth providers (#3204) 2026-02-17 18:16:05 -05:00
patterns Normalize repo references to PrefectHQ/fastmcp casing (#3218) 2026-02-18 14:51:18 -05:00
public/schemas/fastmcp.json chore: Update fastmcp.json schema (#1955) 2025-09-29 20:12:24 -04:00
python-sdk chore: Update SDK documentation (#3273) 2026-02-26 11:19:53 -05:00
servers Add experimental CodeMode transform (#3297) 2026-02-27 12:14:03 -05:00
snippets Reorganize docs around provider architecture (#2723) 2025-12-25 09:00:20 -05:00
tutorials Remove trailing slashes from MCP endpoint URLs in docs (#2277) 2025-10-27 10:36:47 -04:00
v2 Remove stale add_resource() key parameter from docs (#3309) 2026-02-26 16:10:02 -05:00
.ccignore Add comprehensive OAuth 2.1 authentication system with WorkOS integration (#1327) 2025-08-01 17:06:55 -04:00
changelog.mdx Add v3.0.2 release notes (#3276) 2026-02-22 11:41:37 -05:00
docs.json Add experimental CodeMode transform (#3297) 2026-02-27 12:14:03 -05:00
updates.mdx Add v3.0.2 release notes (#3276) 2026-02-22 11:41:37 -05:00
v2-banner.js Update docs for 3.0 GA release (#3216) 2026-02-18 14:29:28 -05:00