Skip to content

When the tool output does not include an outputSchema, the _validate_tool_result during call_tool becomes ineffective. #23

@yuhp-zts

Description

@yuhp-zts

When the tool output does not include an outputSchema, the _validate_tool_result during call_tool becomes ineffective.

t is necessary to add outputSchema=info.outputSchema, otherwise the output structure validation will never be triggered."

async def _list_tmp_tools(self) -> list[Tool]:
	"""List all available tools."""
	return [
		Tool(
				name=info.name,
				description=info.description,
				inputSchema=info.inputSchema,
				outputSchema=info.outputSchema,
		)
		for info in list(self._tmp_tools.values()) if self.is_tool_enabled(
				info.name)
	]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions