Skip to content

tools: move param semantics into inputSchema, drop ctx from descriptions #159

Description

@millsmillsymills

Source

The new rules of context engineering for Claude 5 generation models — the guidance on designing expressive tool interfaces over prose descriptions.

What to build

The tool prose here is strong (defaults, gates, structured Returns) but it all lives in the docstring Args: block, which FastMCP folds into the tool description — parameter schemas carry no descriptions, and a ctx: ... framework-internal line ships to the model on 20 of 28 tools.

  • Emit per-parameter descriptions in inputSchema (timeout_s default, i_accept_responsibility gate semantics, etc.); stop exposing ctx.
  • flipperzero_cli_exec's command stays free-form — the runtime risk classifier (rpc/cli_risk.py) is the design and an enum would be wrong here. Keep the streaming/gated command lists in the tool description, but consider trimming them to a pointer at the flipper://reference/cli resource this server already registers, since that's exactly what the resource is for.

Verify with a tools/list snapshot test.

Acceptance criteria

  • Parameter descriptions appear in inputSchema
  • ctx no longer appears in emitted tool descriptions
  • cli_exec command remains free-form; gated/streaming guidance stays available (description or resource pointer)
  • Snapshot test over tools/list output added or updated

Blocked by

None - can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageMaintainer needs to evaluate this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions