Skip to content

call_tool decorator on the server side add the validate_output parameter #1850

@tanhaipeng

Description

@tanhaipeng

Description

Purpose

  1. Allows the server to independently control whether to perform outputSchema validation (consistent with validate_input).
  2. When both validate_input and validate_output are disabled, tool invocation skips _get_cached_tool_definition, thereby improving performance when calling call_tool.

Code demo

def call_tool(self, *, validate_input: bool = True, validate_output: bool = True):
      xxx

I will submit a PR, please help to merge it when I do.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions