From 145e9c15b88f6a82a12aaa8028e4827ab56b319c Mon Sep 17 00:00:00 2001 From: Ayla Croft Date: Sun, 6 Sep 2026 17:45:44 -0400 Subject: [PATCH] Say that a ToolSpec without input_schema is a tool with no arguments The README describes where a tool schema lives and how argument keys are derived from its properties, but never says what a spec that omits the schema does. That is the first edge a consumer meets: a test double built without an input_schema sends arguments, gets no error, and sees dispatch called with an empty map. Measured against a catalog with one schemaless spec, tools/call with arguments %{"surprise" => "x", "n" => 3}: advertised inputSchema: %{"additionalProperties" => true, "properties" => %{}, "type" => "object"} dispatch received: {:ping, %{}} additionalProperties is true so validation refuses nothing, and the permitted key set is derived from properties, which is empty, so every key is dropped. The behaviour is right; only the documentation was missing. One line, no code change. Closes SCR-251. Signed-off-by: Ayla Croft --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 173f1a8..1ca0734 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,10 @@ held to cannot drift apart. Argument keys are derived from the schema's `propert are passed through unchanged, because turning a string into a domain term is the host's job and a generic layer that guesses has acquired someone else's domain. +A `ToolSpec` that omits `input_schema` is a tool with no arguments: it advertises an open +empty object, so `tools/call` refuses nothing and dispatch is handed `%{}` whatever the client +sent. + Validation is a deliberately small subset of JSON Schema — `type`, `properties`, `required`, `additionalProperties`, and bounds. It refuses rather than guesses, and it is not a general validator.