Skip to content

Choose a tag to compare

@github-actions github-actions released this 31 Oct 16:07
· 103 commits to master since this release
a4a85d7

toolism's second release lets you see every change before you make it, verifies more precisely,
slims more schemas, and adds a local gate. Output stays validation-equivalent at the safe level,
and nothing is removed or renamed, so upgrading from 0.1.0 needs no changes.

Highlights

  • See it before you slim it. The new toolism diff shows a per-tool unified diff, in colour,
    from a file, stdin or a live MCP server, and --exit-code turns it into a CI check.
  • Smarter --verify. When a rule breaks a tool, toolism now reverts only that rule and keeps
    the rest of the savings, instead of restoring the whole tool.
  • More schemas slimmed. The new SL010 rule collapses single-branch allOf wrappers, and SL002
    now rewrites date | None-style fields. At --level annotations, SL103 and SL104 drop titles
    and repeated descriptions.
  • Budgets before the commit. The new toolism-check pre-commit hook runs the same gate as CI,
    and the GitHub Action gains an mcp-timeout input.
  • Fewer API calls for exact counts. An opt-in persistent cache reuses Anthropic token counts
    between runs.
  • More trustworthy results. Fixes to SL008 and --verify remove cases where output could
    differ from what was promised, and Windows tool files with a UTF-8 BOM now load.
  • Python 3.14 is now tested and supported.

Thank you to everyone who contributed, including 19 people who made their first contribution
to toolism in this release.

Added

  • toolism diff: per-tool unified previews of changed descriptions and input schemas,
    with the same level/rule selection as slim, stdin and output-file support, and
    terminal colour (- red, + green, @@ cyan) that respects NO_COLOR.
  • toolism diff --mcp COMMAND previews a live stdio server's tools, with the same
    --mcp-timeout SECONDS and input validation as measure, slim and check (#95).
  • toolism diff gains an --exit-code flag that exits 1 when any tool would change,
    making it easy to gate on unslimmed schemas in CI.
  • SL010 single-allof collapses single-branch allOf wrappers when their keywords can be
    merged without changing validation. Strict tools and uncertain dialect or reference scopes
    are left alone.
  • SL103 drop-titles: opt-in annotation-level rule that removes schema title keywords.
  • SL104 dedupe-descriptions: lossy annotation rule that drops property descriptions matching a
    whole sentence or line of the tool description.
  • Opt-in persistent Anthropic token-count caching via TOOLISM_CACHE_DIR, including baseline,
    probe, marginal and ordered aggregate counts. Bounded, checksummed snapshots use atomic
    replacement and fixed 24-hour generations; README documents clearing and Actions cache use.
  • pre-commit hook toolism-check (.pre-commit-hooks.yaml), the same budget gate as
    toolism check, run before each commit.
  • GitHub Action: the optional mcp-timeout input sets the stdio MCP server timeout; leaving it
    empty keeps the 60-second default. The README now documents every input and output.
  • Python 3.14 is now tested in CI and listed in the package classifiers.
  • examples/openai_startup.py: slim_tools with the OpenAI SDK.
  • README: offline use of the default tokenizer, a security note on --mcp, a cost estimate
    in the FAQ, a Stability section defining the public API and the deprecation policy, and an
    Environment variables section listing every variable toolism reads.

Changed

  • SL002 now hoists format, pattern, minLength and maxLength when rewriting a nullable
    anyOf/oneOf, so date | None (anyOf: [{type: string, format: date}, {type: null}])
    becomes {type: [string, null], format: date}. It only does so when exactly one branch is
    type: string and no other branch can be a string; any other extra keyword leaves the node
    unchanged.
  • --verify no longer throws away every change to a tool when one rule breaks it: it finds the
    rules responsible, reverts only those, and keeps the other rules' savings (re-verified).
    Rollback gains a reverted field, also in the JSON report.
  • GitHub release notes now list the release's pull requests and new contributors.

Fixed

  • SL008 no longer drops additionalProperties: true, items: {} and similar keywords from a tool
    whose schema restricts unevaluatedProperties or unevaluatedItems. These keywords mark
    locations as evaluated there, so dropping them could reject tool calls that were valid.
  • --verify no longer rewrites the schemas it checks. hypothesis-jsonschema resolves $refs in
    place, so with --verify the slimmed output could come back with $refs expanded (more tokens
    than the report showed), and the caller's input tool set was modified too. Verification now
    works on copies; output is identical with and without --verify.
  • Tool files saved with a UTF-8 BOM (PowerShell, some Windows editors) now load from a path,
    from stdin, and through toolism.loads; the BOM is stripped before parsing.
  • A missing input file now comes with a hint to check the path, or to use - or --mcp.
  • toolism diff now reports No changes. on stderr when the rendered diff is empty.
  • toolism measure now preserves duplicate tool name warnings in table, Markdown and JSON output.
  • The source distribution now includes the examples, benchmark corpus and documentation fixtures,
    so downstream packagers can run its test suite.

What's Changed

  • test: pass the env server command as an argv list by @rakeshnitb23 in #19
  • ci: update GitHub Actions to their current major versions by @rakeshnitb23 in #20
  • chore: contributor readiness (code of conduct, CODEOWNERS, badges, CI on master) by @rakeshnitb23 in #21
  • docs: offline use, --mcp security note, cost estimate, stability policy; OpenAI example by @rakeshnitb23 in #33
  • docs: sync the architecture API and CLI reference with the code by @rakeshnitb23 in #37
  • feat: add a toolism-check pre-commit hook by @rakeshnitb23 in #38
  • docs: explain how public API changes are deprecated by @rakeshnitb23 in #36
  • feat(verify): revert only the rules that break a tool, keep the rest by @rakeshnitb23 in #41
  • test: stub tiktoken vocabulary load in the offline CLI test by @yoreva-01 in #39
  • fix(verify): never let hypothesis-jsonschema rewrite the schemas being checked by @rakeshnitb23 in #70
  • chore: add an issue assignment policy and a bot that explains it by @rakeshnitb23 in #72
  • Hint when an input file is missing by @jay23606 in #56
  • examples: print before/after token savings with the Python API by @yoreva-01 in #46
  • feat: add SL103 drop-titles rule by @huong8373tt-beep in #40
  • SL002: hoist string-only keywords when rewriting nullable anyOf by @arvindkumar-ship-it in #58
  • chore: switch the issue policy to first-PR-wins, no assignment needed by @rakeshnitb23 in #77
  • ci: test on Python 3.14 by @omisha123 in #71
  • feat(rules): safely collapse single-branch allOf by @KingEmma7 in #78
  • fix(report): preserve duplicate tool name warnings by @dxnnystyles in #79
  • docs: add version comparison links to CHANGELOG (#69) by @jayeshnehate in #75
  • feat(cli): preview per-tool slimming changes with diff by @CosmonautJones in #80
  • test(cli): cover TOOLISM_DEBUG re-raise branches for ToolismError and TokenizerUnavailable by @nosmile99 in #89
  • docs: document the environment variables toolism reads by @namanraii in #90
  • docs: document JSON report format (measure, slim, check) by @nosmile99 in #92
  • feat: add a weekly contributor leaderboard by @rakeshnitb23 in #103
  • feat: show the leaderboard on the README and congratulate merged PRs by @rakeshnitb23 in #105
  • test(rules): cover SL004 root $id guard for non-local refs by @Reddisekharyadav in #106
  • ci: let the leaderboard workflow comment on merged PRs by @rakeshnitb23 in #107
  • feat(tokenizers): persist opt-in Anthropic token counts by @CosmonautJones in #111
  • ci: add a typos spell-check job by @Jah-yee in #121
  • test(schema): cover detect_dialect fallback for unknown json-schema.org URIs by @nosmile99 in #113
  • test(rules): add SL009 must-not-change fixtures for dialect guards by @nosmile99 in #114
  • test(rules): cover malformed SL002 branches by @dxnnystyles in #115
  • test(verify): pin SKIPPED paths for invalid schema and strategy-build failure by @nosmile99 in #112
  • docs: add docstrings to public report classes by @dxnnystyles in #116
  • docs: add CITATION.cff and release instructions by @dxnnystyles in #117
  • docs: explain the benchmark workflow by @dxnnystyles in #119
  • docs: add a guide to the example files by @dxnnystyles in #120
  • fix(cli): report when diff has no changes by @AnaseDouramane in #108
  • feat(rules): add SL104 dedupe-descriptions by @yoreva-01 in #48
  • feat(cli): colour toolism diff output in a terminal (#96) by @ANO3457 in #118
  • feat(cli): add --exit-code to toolism diff by @MilindLate in #102
  • feat(cli): support MCP input for diff previews by @CosmonautJones in #109
  • fix: accept tool files saved with a UTF-8 BOM by @bfs2021 in #155
  • fix(packaging): ship the assets needed to test the sdist by @sinzbtw in #158
  • fix(rules): keep SL008 validation-equivalent with unevaluated keywords by @rakeshnitb23 in #159
  • docs: match the README and release steps to current behaviour by @rakeshnitb23 in #160
  • ci: test the package and credit contributors in releases by @rakeshnitb23 in #161
  • Feat/action mcp timeout by @Aaqibhafeezkhan in #162
  • Release v0.2.0: preview, smarter verification and more ways to gate by @rakeshnitb23 in #163

New Contributors

Full Changelog: v0.1.0...v0.2.0