SkufosaurRU
Menu

Practice / Tools

Return what the next decision needs

Use compact tool replies that preserve errors, search scope and a way to continue.

90%

Use compact tool replies that preserve errors, search scope and a way to continue.

Sections and scope

Search tools and other responses that can return many results.

A smaller response can hide relevant results. Check the whole task before claiming savings.

Quick check

Check that the agent can tell an incomplete page from a complete search with no match.

Download the test script · node check-tool-output.mjs

Six cases cover matches on both pages, pagination, no match, a missing cursor and source failure.

Synthetic inputs. This tests the rule and makes no model or cost claims.

Design the response

Pick the decision the agent must make. Return the necessary fields, the search scope and a cursor when the response is incomplete. Keep a tool error distinct from an empty successful result.

Nobody asked the search tool to bring the filing cabinet.

Verify the behaviour

Test a first-page match, a last-page match and a complete search without a match. Add cases for a missing cursor and a source failure. Compare the final answer and all tool calls with the full-output version.

The downloadable fixture checks the expected classifications on synthetic inputs. It does not measure model performance or token savings.

Sources and origin