Skip to content

fix[parser]: pick up typed and dict() tool annotations - #142

Merged
aschlean merged 3 commits into
mainfrom
cursor/parse-typed-tool-annotations
Sep 9, 2026
Merged

aschlean merged 3 commits into
mainfrom
cursor/parse-typed-tool-annotations

Conversation

@aschlean

@aschlean aschlean commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Tool annotations with a type hint (annotations: dict = {...}) or dict(...) were silently dropped at parse time, so MCP clients never saw readOnlyHint and related hints.
  • The parser now accepts those forms, still supports the documented dict literal, and warns when annotations is present but unparseable.

Test plan

  • pytest tests/core/test_parser.py tests/core/test_builder.py tests/core/test_fastmcp_v4_integration.py
  • End-to-end Golf build + FastMCP tools/list for documented assign, typed assignment, and dict() constructor on both 2026-07-28 and 2025-11-25

Made with Cursor

aschlean and others added 3 commits September 9, 2026 16:05
Module-level annotations with a type hint or dict() constructor were
silently dropped, so MCP clients never saw the hints.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@aschlean
aschlean marked this pull request as ready for review September 9, 2026 14:42
@aschlean
aschlean merged commit e69982b into main Sep 9, 2026
5 checks passed
@aschlean
aschlean deleted the cursor/parse-typed-tool-annotations branch September 9, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant