tools._validation

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Validate the JSON Schema vocabulary emitted for Chirp tool parameters.

Validate the JSON Schema vocabulary emitted for Chirp tool parameters.

tools._validation

Name Type Default Description
type —
qualified_name —
element_type —
description —
source_file —
line_number —
is_autodoc —
autodoc_element —
_autodoc_template —
_autodoc_url_path —
_autodoc_page_type —
title —
doc_content_hash —

Symbols on this page

ToolArgumentsError
class

Arguments violate a tool schema; safe to report to the MCP caller.

validate_arguments
function
def validate_arguments(name: str, arguments: dict[str, Any], schema: dict[str, Any]) -> None

Reject schema-invalid input before dispatch without coercing arguments.

Covers the types, properties, required fields, unions, and array items emitted by function_to_schema. Additional properties remain allowed, as advertised. Error messages identify the tool and parameter without echoing input values.

Parameters

Name Type Default Description
name str —
arguments dict[str, Any] —
schema dict[str, Any] —

View source · /home/runner/work/chirp/chirp/site/../src/chirp/tools/_validation.py:1