Skip to content

Say that a ToolSpec without input_schema is a tool with no arguments - #5

Merged
HackTuah merged 1 commit into
mainfrom
readme/default-input-schema
Sep 6, 2026
Merged

Say that a ToolSpec without input_schema is a tool with no arguments#5
HackTuah merged 1 commit into
mainfrom
readme/default-input-schema

Conversation

@HackTuah

@HackTuah HackTuah commented Sep 6, 2026

Copy link
Copy Markdown
Member

One README line, no code change. Closes SCR-251.

ToolSpec defaults input_schema to an open object. The README explained where a schema lives and how argument keys are derived from properties, but never what a spec that omits the schema does — which is the first edge a consumer's test double hits.

Measured against a catalog holding one schemaless spec, tools/call with arguments of %{"surprise" => "x", "n" => 3}:

advertised inputSchema: %{"additionalProperties" => true, "properties" => %{}, "type" => "object"}
dispatch received: {:ping, %{}}

additionalProperties is true, so validation refuses nothing; the permitted key set comes from properties, which is empty, so every key is dropped. The behaviour is coherent — a spec with no schema is a tool with no arguments — and only the documentation was missing.

Gate green locally: format, compile, test, credo, reuse, licence files.

Ships in 0.1.1.

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 <aylacroft@proton.me>
@HackTuah
HackTuah force-pushed the readme/default-input-schema branch from 253ecb4 to 145e9c1 Compare September 6, 2026 21:46
@HackTuah
HackTuah merged commit 38e3177 into main Sep 6, 2026
4 checks passed
@HackTuah
HackTuah deleted the readme/default-input-schema branch September 6, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant