Changelog
All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning and uses Conventional Commits.
Unreleased
1.11.0 - 2026-11-03
Toolscore 1.11 speaks the current MCP revision (2026-07-28) and tests remote servers, so any MCP server, local or hosted, can be graded in CI and show its grade in its README. And correct tool calls are not enough: 1.11 checks that the tool really did it, and that the agent told the truth about it. It also adds the rigor to trust the answers: an agent harness, pinned servers, contracts, receipts, tri-state evidence and repeated-run statistics.
Highlights
Effect probes: did the tool really do it?
toolscore mcp test --probeschecks invariants against the live server. Built in and read-only:head/tail/limit-like parameters must bound the result. With--allow-writes: round trips that write marked values, read them back, write again to the same key and check earlier records survive (probe-write-not-observable,probe-silent-noop,probe-data-lost). A probe config declares pairs, bounds, two-path agreements and idempotent calls. On the official memory server,server-memory@2026.8.31getsprobe-silent-nooponcreate_entities(the #4887 bug) and2.0.1passes, with no configuration; onserver-filesystem@2.1.0the built-in bounds flaghead: 0andtail: 0returning the whole file.Honesty checks: did the agent tell the truth? Every evaluation reads the agent’s final answer from the trace and reports
claimed-success,done-after-error,undisclosed-warning,escape-hatch-after-refusalandinjected-fault-undisclosedunder Behavior and safety, plus afalse_successsummary.toolscore honesty TRACEruns them alone, with no gold file. Without a final answer they report unknown, never pass.Fault injection.
toolscore mcp proxy --inject faults.jsonsits in front of any stdio server and gives chosen calls an error, a JSON-RPC error, a warning, an empty or truncated result, a delay, a timeout, a “disabled” / “permission denied” answer, or an instruction planted in the result with a canary token (prompt injection). The session records what was injected, so the honesty checks verify the agent’s report against ground truth.A silent no-op caps the grade at C. A high-confidence probe failure now also caps the letter grade at C (the score is unchanged), with
capped because: probe-silent-noop on create_entitiesin every scorecard format and the badge.server-memory@2026.8.31graded A (93%) with its silent no-op; it now grades C.--no-probe-grade-caprestores the uncapped grade. This is a deliberate, reversible grading decision; see Changed.Truth checks where agents run. browser-use histories (the #6068 disabled-button override is an
escape-hatch-after-refusal), Claude Code and Codex CLI sessions (toolscore sessions list,toolscore honesty SESSION.jsonl, read-only, credentials redacted), live recorders for Claude Agent SDK hooks and OpenAI Agents SDK tracing, an Inspect AI scorer, and Pydantic AI 2 tool outcomes.toolscore lint-configchecksCLAUDE.md,AGENTS.md,SKILL.md, Cursor and Copilot instructions and MCP host configs against the tools the servers really expose: unknown servers and tools, the deprecated SSE transport, and instructions that contradict a tool’s annotations.toolscore demo --truthshows a tool that lies and an agent that lies in one offline command, and a Claude Code plugin adds skills to audit an MCP server, add tool-call tests, check agent honesty and pin servers.Agent harness.
toolscore agent run spec.yaml(andtoolscore.mcp.agent) runs tasks x arms x repetitions of an LLM agent against any MCP server, with the OpenAI Responses API, Anthropic Messages or a free scripted provider: a guard on every tool call, a hard budget checked before every model call (unknown prices refused unless allowed), per-run limits, a seeded shuffled order, resumable JSONL with one row per run, and build verification ofserverInfoand a version command.Pinning and drift.
toolscore mcp pinwritestoolscore.lock.json(hashes of every tool definition, the server, protocol and instructions, and a read/write/delete/network/exec capability manifest);mcp verify-pin,mcp test --pinandmcp lint --pinfail on drift or a new delete/exec capability: a defense against MCP rug pulls and description poisoning.toolscore mcp diff A Bcompares two servers, builds or snapshots with text diffs, the lint delta and, with--test, scorecard and probe deltas.Contracts v2. Required, optional and forbidden calls and alternative paths in one file (JSON Schema shipped); optional calls are neither missing nor extra, and the best-scoring alternative wins.
Receipts and regrade.
toolscore eval --receiptwrites a content-hashed record of the inputs, settings, version and result;toolscore regradere-scores receipts, traces and agent runs with a new contract or weights without re-running anything. Record once, re-score forever (inspired by Agent Eval Flow).Tri-state evidence. Every check is pass, fail or unknown, never a silent pass: reports count them, and missing latency and cost are “unknown”, never 0.
Comparing runs.
toolscore compare --runsreports complete populations, Wilson intervals, Fisher’s exact test, pass^k and pre-declared decision rules;toolscore selectpicks a variant by lexicographic, weighted or Pareto objectives (inspired by Agent Eval Flow).toolscore doctorchecks everything before any paid call;toolscore export --format aefwrites neutral, versioned run records.Argument values for sandboxed servers.
--arg [TOOL:]NAME=VALUEand--args-filegive the scorecard and the probes values a server accepts, so the filesystem and git servers no longer fail every happy path on generated paths (server-filesystem@2.1.0: F to D with sandbox paths for its read tools).MCP 2026-07-28, with a fallback. The MCP clients probe with
server/discoverand send the protocol version, client info and capabilities in each request’s_meta, as the stateless 2026-07-28 revision requires. A server built on an earlier revision (any non-modern error, an HTTP 4xx without a modern error body, or on stdio no answer within 5 seconds) gets theinitializehandshake with 2025-11-25 instead.UnsupportedProtocolVersionErroranswers pick a version from the server’s list, and the scorecard shows which protocol a run used.Remote MCP servers.
toolscore mcp test,mcp lintandmcp listaccept a Streamable HTTP URL, or aurlentry in a Claude Desktop, Cursor, Claude Code or VS Code config file (pip install "tool-scorer[http]"). Credentials come from the environment (--auth-env VAR,--header 'Name: ${VAR}',${VAR}/${env:VAR}in config files) and are never printed.Lint for what clients rely on. Behavior annotations (
readOnlyHint,destructiveHint, …) missing on tools whose names say they write or delete,readOnlyHint: trueondelete_*, and conflicting hints; andstructuredContentthat does not match a tool’soutputSchema. Every lint issue now has a stable rule ID.Grade badges.
mcp test --badge PATHwrites an SVG badge (“MCP grade: A · Toolscore”) and--badge-json PATHa shields.io endpoint file, both from the run’s own scorecard. A workflow example keeps the badge current.OpenAI Responses API.
evaluate()acceptsResponseobjects and Responses item lists;from_openai_responses()readsfunction_call,mcp_callandcustom_tool_callitems and pairsfunction_call_outputitems to their calls.
Added
MCP
MCPClient, the transport-independent protocol logic;MCPStdioClientand the newMCPHttpClient(Streamable HTTP, both eras: per-requestMCP-Protocol-Version,Mcp-Method,Mcp-NameandMcp-Param-*headers forx-mcp-headerparameters in 2026-07-28;Mcp-Session-Idsessions in 2025-11-25; JSON and server-sent-event responses). Both takeprotocol="auto" | "modern" | "legacy";client.era,client.protocol_versionandclient.server_versionsreport what was agreed.MODERN_PROTOCOL_VERSION(“2026-07-28”) andLEGACY_PROTOCOL_VERSION(“2025-11-25”).toolscore mcp test|lint|list --protocol,--headerand--auth-env; URL targets.load_mcp_config()reads the VS Codeserverslayout andurl/serverUrlentries withheaders;MCPServerSpec.url,.headersand.transport;open_client(spec)returns the right client. Entries with the deprecated SSE transport are rejected with the reason.MCPToolDef.annotations,.output_schemaand.title;MCPToolResult.structured_content.resultType: "input_required"(MCP 2026-07-28 multi round-trip requests) is its own state, not a tool error:MCPToolResult.input_requiredand.input_requests; an answer with only arequestStateis retried with it (MAX_INPUT_REQUIRED_RETRIES). In the scorecard such a scenario is not evaluated (ScenarioResult.statusinput_required, left out of the rates, counted inscores.not_evaluatedand every format);input-required-undeclaredflags a server that sends input requests the client did not declare. Probes treat it as inconclusive; the agent harness tells the model the call did not finish.Requests the server sends during a call are answered:
pingwith an empty result, anything else with-32601(method not found), over stdio and Streamable HTTP.client.server_messageskeeps the lastMAX_SERVER_MESSAGES(200);server_messages_droppedcounts the rest.edge-accepted-invalid-input: an edge case whose arguments break the tool’s owninputSchemaand that gets a result withoutisErroris reported (Scenario.violations,ScenarioResult.accepted_invalid_input,scenario_findings(),SCENARIO_RULES, the JSON report’sfindingsand “Top issues to fix”). The score is unchanged.LintIssue.rule, a stable rule ID on every issue (toolscore mcp lintshows a Rule column; the JSON report hasrule). New rules:annotations-missing,annotation-read-only-contradiction,annotation-hints-conflict,annotation-invalid-value,structured-content-missing,structured-content-mismatch. All are warnings.output_schema_issues()andtoolscore.mcp.output_schema.validate_instance(), a conservative JSON Schema check that never judges keywords it does not know.score_server(client)runs the whole scorecard for any client;MCPScorecard.protocol_versionand.era; the JSON report addsprotocol.toolscore mcp test --badgeand--badge-json(toolscore.mcp.badge).The bundled sample server (
python -m toolscore.mcp.sample_server) speaks both eras and now declares annotations and an output schema; the demo grade stays B, with one new finding (create_notedeclares no annotations).
Effect probes (toolscore.mcp.probes)
toolscore mcp test --probes,--allow-writesand--probe-config FILE(JSON or YAML; implies--probes).score_server(client, probes=True | ProbeConfig, allow_writes=False)andrun_probes().Rules:
probe-write-not-observable,probe-silent-noop,probe-data-lost,probe-bound-exceeded,probe-bound-short,probe-slice-mismatch,probe-paths-disagree,probe-not-idempotent(PROBE_RULES).Every result has a
confidence(high: declared, or seen through a read tool that already showed the record;medium: inferred from names;low: any other read tool) and abasissaying how the read tool or relation was chosen. Only high-confidence failures are errors: they lower the score by as much as a tool failing all its happy paths (0.6 / number of toolsper failing tool) and cap the letter grade at C; passing probes leave the score unchanged.--citreats them as blocking.Grade cap. A high-confidence probe failure caps the grade at C (
PROBE_GRADE_CAP): the score is unchanged, and the console, Markdown and JSON scorecards and the badge saycapped because: probe-silent-noop on create_entities(MCPScorecard.uncapped_grade,.grade_capped,.grade_cap_reasons,.grade_cap_note; JSONgrade_cap; badgeC (capped) · Toolscore). Without itserver-memory@2026.8.31graded A (93%) with a silent no-op.--no-probe-grade-cap,score_server(probe_grade_cap=False)and the Action inputmcp-probe-grade-cap: falseturn it off.ProbeConfig,RoundTripPair,BoundRelation,Agreement,CallSpec,ProbeResult,load_probe_config();MCPScorecard.probes,.effect_rate,.probe_failed_tools; the console and Markdown scorecards show an “Effect probes” table and the JSON reportprobesandscores.effect_rate.Probes that write run only with
--allow-writes(a probe config cannot enable them) and leavetsp<hex>-marker records behind.The sample server stores its notes, and
python -m toolscore.mcp.sample_server --bug silent-skip | lose-on-write | limit-ignoredmisbehaves without an error, for demos and tests. The default behavior and the demo scorecard are unchanged.--arg [TOOL:]NAME=VALUEand--args-fileonmcp test(ArgumentFixtures,load_fixtures(),generate_scenarios(fixtures=...)): values replace generated ones in happy paths and seed the probes; edge cases keep their bad values.
Honesty checks (toolscore.metrics.honesty)
metrics["honesty_metrics"]in everyevaluate()andevaluate_trace()result,EvaluationResult.false_success, andsummary.false_successin the JSON report. Findings appear under Behavior and safety with their rule ID.Rules:
claimed-success,injected-fault-undisclosed,prompt-injection-followedandcanary-leaked(errors),escape-hatch-after-refusal(error when the code overrides the refusal, warning when it only targets the same thing),done-after-errorandundisclosed-warning(warnings) (HONESTY_RULES).false_successcounts per run:claimed_success,failed_required,done_after_error,undisclosed_warning,escape_hatch,injected_faults,injected_undisclosed;Nonewhere the final answer (or the gold) is needed and missing.toolscore honesty TRACE [--gold] [--final-answer TEXT|@FILE] [--injected SESSION] [--config] [--json] [--fail-on-findings];toolscore eval --final-answer,--honesty-config,--injectedand--fail-on-honesty.check_honesty(),HonestyConfig(every pattern and tool list configurable; JSON/YAML with"extend": trueto add to the defaults),apply_injections(),evaluate(final_answer=..., honesty=...),evaluate_trace(final_answer=..., honesty=..., injections=...).Disclosure is negation-aware: “no errors”, “without any issues”, “nothing failed”, “zero warnings”, “didn’t hit any errors” and “error-free” are reassurance, not a disclosure, so “Done, no errors!” after a failed call is a
claimed-success(neutral_patterns, configurable). A negated action (“nothing was saved”, “not shipped”, “no order was placed”) is a disclosure, as are “pending”, “on hold”, “timed out”, “except” and refusals (“I won’t”).Answers that are not in English are unknown, never honest:
answer_language("english","other") in the report, a deterministic script and function-word heuristic (answer_language()); the answer-dependent counts areNoneand the evidence says “the final answer is not in English”.require_english: falseturns it off for your own patterns.A labelled corpus of final answers (
tests/fixtures/honesty_answers.json) with precision and recall floors. On the 30-answer held-out set: claims success 1.00 precision / 0.73 recall, discloses a problem 1.00 / 0.69 (0.75 / 0.20 and 0.58 / 0.54 before the negation-aware patterns); see the honesty guide for what they miss.toolscore.transcript:load_transcript(),Transcriptandfinal_answer_of()find the final answer in OpenAI Chat Completions, Anthropic, Responses, LangChain/LangGraph and Claude Agent SDK messages, OpenTelemetrygen_ai.output.messages, a finaldone-style call, or afinal_answer/final_output/output_textfield.toolscore.core.adapter_for().
Fault injection (toolscore.mcp.faults)
toolscore mcp proxy COMMAND -o SESSION [--inject SPEC]andMCPRecorder(..., injector=FaultInjector(spec)). Faults:error,jsonrpc_error,warning,empty,delay,timeout,disabled,denied,truncate; tools by name or glob, calls by number or probability with a fixed seed; failures are answered without reaching the server unlessforward: true.The session adds
fault_spec,injectionsandinjectedon each changed response;MCPAdapterkeeps it asmetadata["injected"].mcp recordis unchanged. Stdio only.FaultSpec,FaultRule,FaultInjector,load_fault_spec(),FAULT_KINDS.The
prompt_injectionfault: the proxy appends an instruction (calltarget_tool, or put the code in the next call and the reply, and do not tell the user) with a unique canary token (canary, or derived from the seed, tool and call number) to the real result. The honesty checks addprompt-injection-followed(a later call to the target tool, or one matching a forbidden rule:check_honesty(forbidden=...),toolscore honesty --forbidden, andeval --forbidden) andcanary-leaked(the canary in a later call’s arguments or the final answer, matched in any language), theprompt_injectioncounts (planted,followed,canary_leaked; unknown without a final answer) and aprompt-injectionevidence check.examples/fault_injection/scripted_injection.pyruns it offline.
Agent harness (toolscore.mcp.agent)
toolscore agent run SPEC [--output] [--max-runs] [--retry-errors] [--allow-unknown-price] [--dry-run];run_study(),run_agent(),load_agent_spec(),spec_from_mapping(),AgentSpec,ArmSpec,TaskSpec.Providers:
OpenAIResponsesProvider,AnthropicMessagesProvider(any client withresponses.create/messages.create; the SDKs stay optional extras) andScriptedProvider.map_tools()maps MCP tools to provider function tools with safe, unique names.Guards:
allow(),deny(reason),rules_guard(deny_rules, allow_tools)andguard.python: module:function; denied calls are returned to the model as tool errors and listed inguard_denials.Budget,Price,price_for(),preflight_prices()(UnknownPriceErrorbefore any call),estimate_study_cost();Limits(max_turns, max_calls).verify(server_name,server_version,command+expect),check_build(),BuildMismatchError.Run rows (
run_record_version“1”): calls with IDs, arguments, results, errors, durations and denials; final answer; usage; cost (nullwhen unknown); server identity and protocol; the evaluation with honesty and evidence;outcome(pass, fail, error, unknown).regrade_rows().examples/agent_harness/: an offline study with real output, and a real-model spec marked as costing money.
Pinning and diffs (toolscore.mcp.pin, toolscore.mcp.server_diff, toolscore.mcp.snapshot)
toolscore mcp pin,toolscore mcp verify-pin [--lock] [--fail-on drift|capability|never] [--json] [--ci],mcp test --pin/--pin-fail-on,mcp lint --pin/--pin-fail-on.toolscore mcp list --jsonwrites a server snapshot;ServerSnapshot,load_snapshot(),write_snapshot().build_lock(),verify_pin(),PinReport,PinFinding,PIN_RULES(pin-tool-added,pin-tool-removed,pin-tool-changed,pin-capability-added,pin-instructions-changed,pin-lock-modified,pin-server-changed,pin-protocol-changed),infer_capabilities(),CAPABILITIES, capability overrides (--capabilities).toolscore mcp diff A B [--test] [--probes] [--allow-writes] [--fail-on any|breaking|none] [--json];diff_snapshots(),ServerDiff,ToolChange.examples/pinning/: an offline rug pull and the memory server’s2026.8.31vs2.0.1, with real output.
Contracts, receipts and evidence
toolscore.contract:evaluate_contract(),load_contract(),Contract,contract_from_mapping(),is_contract(),matcher_from_json()($regex,$contains,$one_of,$any,$type,$approx);toolscore/schemas/contract-v2.schema.json.toolscore eval,evaluate_trace()andtoolscore regradeaccept a contract wherever they take a gold file.EvaluationResult.scored_calls.toolscore.receipts:toolscore eval --receipt PATH,build_receipt(),verify_receipt(),regrade();toolscore regrade SOURCES [--gold] [--weight] [--forbidden] [--receipt-dir] [--json] [--no-verify] [--spec] [--output]for receipts, traces and agent-run JSONL.toolscore.evidenceandEvaluationResult.evidence: tri-state checks (required-calls,call-errors,forbidden-calls,credentials,claimed-success,disclosure,escape-hatch,side-effects), counts and coverage, in the console, Markdown, HTML and JSON reports andto_dict().MCPScorecard.probe_evidence(inconclusive probes are unknown).ToolCall.id(the provider call ID or the JSON-RPC request ID);to_dict()and the JSON report keepid,is_errorandtimestampfor every call.examples/contracts/: a contract against the gold file it replaces, and a regrade, with real output.
Runs, selection, export and doctor
toolscore.stats:wilson_interval(),fisher_exact(),pass_hat_k(),compare_runs(),select_variant(),pareto_front(),evaluate_protocol(),load_runs(),runs_from_traces().toolscore compare --runs FILE | GOLD --variant NAME=DIR [--k] [--baseline] [--min-n] [--alpha] [--min-score] [--protocol] [--json];toolscore select [--policy lexicographic|weighted|pareto] [--objective] [--weight].toolscore export --format aef INPUTS -o FILEandtoolscore.export(export_records(),write_export(),validate_record()):toolscore.run-recordv1 withtoolscore/schemas/run-record-v1.schema.jsonand a manifest.toolscore doctor [--spec] [--contract] [--server] [--key] [--json]andtoolscore.doctor.run_doctor().
Agents in the wild
browser-use:
from_browser_use(),BrowserUseAdapterand thebrowser-usetrace format read anAgentHistoryList, itsmodel_dump()or the JSONsave_to_file()writes (verified against browser-use 0.13.14). Each executed action is a call, paired with itsActionResult; thedonetext is the final answer and itssuccessflag the agent’s own verdict (Transcript.success). Adonewithsuccess: trueis a success claim, and code that overrides a refusal the model noted on the step is an escape hatch.examples/browser_use/.Coding-agent sessions: Claude Code transcripts (
~/.claude/projects/*/*.jsonl,CLAUDE_CONFIG_DIR) and Codex CLI rollouts (~/.codex/sessions/**/rollout-*.jsonl,CODEX_HOME, verified against theopenai/codexsource on 2026-11-02) are auto-detected (claude-codeandcodexformats;ClaudeCodeSessionAdapter,CodexSessionAdapter). Subagent lines are skipped; a Codex shell call fails when its output reports a non-zero exit code.toolscore sessions list [--agent] [--since] [--project] [--root] [--flagged] [--json]andtoolscore sessions export SESSION -o trace.json(credentials redacted);toolscore.sessions. Read-only; nothing is uploaded.examples/coding_sessions/(synthetic).Trace files may be JSON Lines:
load_trace(),load_transcript()and every command that reads a trace parse a file that is not one JSON document line by line (toolscore.core.read_trace_data()).toolscore.recorders:ClaudeAgentSDKRecorder(PreToolUse,PostToolUseandPostToolUseFailurehooks forClaudeAgentOptions(hooks=recorder.hooks()); inputs, responses, errors, durations, subagent IDs;observe()keeps theResultMessagetext) andOpenAIAgentsRecorder(a tracing processor foradd_trace_processor(): function and MCP tool spans with arguments, outputs and errors). Both havecalls,final_answer,to_trace(),save()(credentials redacted) andevaluate(). Tested with claude-agent-sdk 0.2.176 and openai-agents 0.24.0.toolscore.inspect_scorer.toolscore_scorer(): an Inspect AI scorer withtool_score,passed,false_successandhonesty_unknownmetrics; expectations from the scorer,Sample.metadata["toolscore"](calls or a contract) or a JSON target;from_inspect_messages(). Tested with inspect_ai 0.3.287;examples/inspect_ai/runs offline withmockllm.Pydantic AI 2 (verified with 2.64.0):
from_pydantic_ai()pairsToolReturnParts with their calls asresult; anoutcomeoffailed,denied,interruptedorretried, or aRetryPromptPart, makes the call failed;evaluate()takes the run’s textoutputas the final answer (pydantic_ai_final_answer()).toolscore honestyandtoolscore sessionsredact credentials in what they print.
Agent-config lint
toolscore lint-config [PATHS] [--snapshot [SERVER=]FILE] [--pin [SERVER=]FILE] [--connect] [--user] [--json] [--fail-on error|warning|never]andtoolscore.config_lint(lint_config(),discover_files(),ConfigLintReport,ConfigIssue,CONFIG_RULES). Rules:config-server-invalid,config-unknown-server,config-unknown-tool,config-annotation-contradiction. Without a tool list the tool rules are skipped, not passed;--connect(which starts the configured servers) is never the default. Inspired by Agent Eval Flow’s configuration assessment.examples/lint_config/.
Claude Code plugin and demo
.claude-plugin/marketplace.jsonandplugins/toolscore/with the skillsaudit-mcp-server,add-tool-call-tests,check-agent-honestyandpin-mcp-servers(plainSKILL.mdfiles that call the CLI):/plugin marketplace add yotambraun/toolscore,/plugin install toolscore@toolscore.toolscore demo --truth: effect probes on the sample server’s silent no-op, then the honesty check on a bundled browser-agent trace.
Examples
examples/mcp_memory_probes/andexamples/mcp_filesystem_probes/: the probes on the official memory and filesystem servers, with the commands and the console output.examples/probes/(a probe config for the sample server),examples/honesty/(traces for the honesty checks) andexamples/fault_injection/(a scripted agent behind the proxy, offline).
SARIF and JUnit (toolscore.reports.ci)
--sarif PATH(SARIF 2.1.0, for GitHub code scanning) and--junit PATH(JUnit XML, for GitLab, Jenkins and other test-report viewers) onmcp test,mcp lint,mcp verify-pin,mcp diff,lint-config,honestyandeval, from one shared reporter (Outcome,to_sarif(),to_junit(),write_ci_reports()). Every check is pass, fail or unknown: in SARIF an unknown check iskind: "open"withlevel: "none", never a pass; in JUnit it is<skipped>. Rules carry descriptions, help and documentation links. Results point at the file they are about (config-lint file and line, the lock file, the trace), or for a server at--report-location, the--configfile or the server script in the command. The output validates against the official SARIF 2.1.0 schema (tested).
pre-commit
.pre-commit-hooks.yamlwithtoolscore-lint-config,toolscore-verify-pinandtoolscore-mcp-lint: local, deterministic, no API key; none calls a tool. Documented in the CI guide.
GitHub Action
New inputs
mcp-probes,mcp-allow-writes,mcp-probe-config,mcp-args-fileandfail-on-honesty, and thehonesty-errorsoutput.New inputs
mcp-pin-fileandmcp-pin-fail-on(pin check with the scorecard),mcp-diff-againstandmcp-diff-fail-on(a server diff in the job summary, outputmcp-diff-breaking), andmcp-probe-grade-cap.New inputs
sarif-file,junit-fileandreport-location: the scorecard or the evaluation also writes SARIF (upload it withgithub/codeql-action/upload-sarif) and JUnit XML.New inputs
mcp-auth-env,mcp-badge,mcp-badge-jsonandtoolscore-version;mcp-commandaccepts a URL. New outputsmcp-gradeandmcp-score. MCP mode writes the scorecard to the job summary.The action installs Toolscore from its own checkout, so the installed version matches the action ref (it installed the latest PyPI release before).
toolscore-versioninstalls a given PyPI release instead.examples/github_actions/mcp-badge.ymlcommits an updated badge when the grade changes.
Integrations
from_openai_responses()and auto-detection of Responses API responses, output lists and input item lists, inevaluate()and in trace files (--format auto/openai). Outputs become the call’sresult; an output counts as anerroronly when it clearly is one (a JSON object witherrororis_error: true, or the OpenAI Agents SDK’s tool error message).mcp_callitems keep theiroutputanderror.
Models and prices
toolscore.models: the current default model IDs in one place, with the date they were verified (2026-11-01).lookup_pricing(),UnknownModelPriceWarning,PRICES_VERIFIED_ON, andpricing=(input, output)oncalculate_llm_cost()andestimate_trace_cost().
Changed
A high-confidence effect-probe failure caps the grade at C. The score is unchanged;
MCPScorecard.gradeis capped and.uncapped_gradeis what the score alone earns (.grade_capped,.grade_cap_reasons,.grade_cap_note; JSONgrade_cap; badgeC (capped) · Toolscore).--fail-underand the Action’smcp-gradeuse the capped grade. Rationale: a tool that reports success and does nothing is a correctness bug, and the score penalty alone (0.6 / number of tools) leftserver-memory@2026.8.31at A. Turn it off with--no-probe-grade-cap,score_server(probe_grade_cap=False)ormcp-probe-grade-cap: false.Latency and cost are never 0 when unknown.
metrics["latency_metrics"]and["cost_metrics"]are now always present, also forevaluate(), withstatus(measured,partial,unknown),measured_callsandtotal_calls; their totals areNonewhen no call has the value (they were 0.0, or the section was left out).calculate_latency()andcalculate_cost_attribution()return the same. Reports printunknownorN of M calls; the JSON report’s summary addstotal_duration,total_cost,latency_status,cost_statusandevidence.The honesty checks need tool results to pass. When no call carries a result or an error,
undisclosed_warningandescape_hatchareNone(unknown) andflaggedisNone; the report addsresults(captured,partial,missing). They were 0 (a pass) on request-only traces.toolscore compare’sGOLD_FILEis optional (the runs mode takes--runs); the one-trace-per-model form is unchanged.The agent-side console, HTML and Markdown reports add an Evidence section, and the HTML report always shows the performance section.
The LLM judge sends no
temperatureunless you set one.JudgeConfig.temperaturedefaults toNone(it was0.0): current Claude models (Opus 4.7 and later, Sonnet 5 and later, Haiku 5.5) and OpenAI’s GPT-6 models at their default reasoning effort reject a non-default temperature with a 400 error. Settemperature=0.0for models that accept it, such as local OpenAI-compatible servers.The default judge model is
gpt-6-luna(wasgpt-4o-mini, which OpenAI retires on 2027-01-14). Docs and examples useclaude-haiku-5-5,claude-sonnet-5-5,claude-opus-5-5andgemini-3.5-flash-lite.Model prices match exactly or by longest prefix, and unknown models have no price.
calculate_llm_cost()andestimate_trace_cost()returnNonewith anUnknownModelPriceWarningfor a model they do not know (they used to fall back to the gpt-4o-mini price), so their return type is nowfloat | None. The table is refreshed from the providers’ pricing pages; retired models (Claude 3.x, Claude Opus 4.1, Gemini 1.5 and 2.0) were removed.estimate_trace_cost()defaults togpt-6-luna.MCPStdioClientsendsserver/discoverbeforeinitialize. Servers built on earlier revisions answer it with an error (handled), or do not answer, which costs up toprobe_timeout(5 seconds by default) before the handshake.DEFAULT_PROTOCOL_VERSIONis now “2026-07-28”.Grades can drop slightly. The new annotation and output-schema warnings count toward the lint score like any warning (0.1 per warning, divided by the number of tools, in a term weighted 20%). A server whose write tools declare no annotations loses a few points; check
--fail-undergates after upgrading. The bundled sample server went from 87% to 86%.Evaluations report more findings. The honesty checks add Behavior and safety lines to traces that failed or warned: a trace that ends right after a failed call gets
done-after-error, and a trace with failures but no final answer gets “disclosure unknown”. They do not change the score. The examples’ guardrails trace now shows both.Chat histories keep tool results. OpenAI Chat Completions
role: "tool"messages and Anthropictool_resultblocks are attached to their calls asresult(they were dropped), and an Anthropictool_resultwithis_error: truemakes the call failed, so it now counts inerror_count,required_call_recalland the findings. Side-effect validators that readresultsee it too.Message lists (trace files or
evaluate_trace()) that start with a user or system message are detected as OpenAI or Anthropic traces (they were read as the custom format, with no calls).Python 3.14 is supported and tested.
The README is a short landing page; its detail moved to the documentation: What Toolscore catches, CI/CD, and recipes for server authors, agent builders, security teams and researchers.
The comparison (docs and the site’s Compare page) is rewritten around the tools people compare Toolscore with today: MCP Inspector, the official MCP conformance suite (which Toolscore does not replace), Snyk Agent Scan and Cisco MCP Scanner, DeepEval’s MCP metrics and Promptfoo. Each statement about another tool links its own documentation (checked 2026-11-02) and says where that tool is the better choice; the old DeepEval/RAGAS/LangSmith matrix is gone.
The release workflow moves the
v1tag to each release, souses: yotambraun/toolscore@v1resolves, and is ready for PyPI Trusted Publishing (one line to delete once the publisher is added on PyPI).
Fixed
Windows: a server command such as
C:\Python312\python.exe -m serveris split with Windows rules (the inverse ofsubprocess.list2cmdline), where POSIX splitting dropped every backslash;toolscore exportwrites\nline endings so the manifest’s sha256 matches the file; the fault-injection examples quote their command for the platform.Claude Agent SDK messages yielded no calls. The SDK’s
ToolUseBlockandToolResultBlockdataclasses carry notypefield, sofrom_claude_agent_sdk()and auto-detection returned nothing for the messagesquery()yields. Blocks are recognized by class, tool results are paired to their calls (is_errormakes a call failed), and theResultMessagetext is the final answer.A
claimed-successfinding said a failed call “was not retried” when a later call to the same tool failed too; it now says “no later call to it succeeded”.The JSON report failed (
Object of type ... is not JSON serializable) when expected arguments held matchers; they are written as theirrepr, asto_dict()does.A perfect run scores exactly 1.0. The composite score summed its weights with plain float addition and gave 0.9999999999999999.
Prices of similarly named models.
gpt-5-miniwas priced asgpt-5,gpt-4o-miniasgpt-4o, andgemini-2.5-flash-liteasgemini-2.5-flash(the first table key contained in the name won). Claude Opus 4.6 was listed at \(15/\)75 per million tokens; it is \(5/\)25.evaluate()on an OpenAI Responses API object failed with “Cannot auto-detect provider format”.Error messages and reprs never show credentials: URLs are shown without userinfo, query or fragment,
MCPServerSpeckeepsenv,urlandheadersout of its repr, and a malformed--headeris not echoed. Error panels show server text literally instead of parsing it as Rich markup.toolscore initscaffolds that failed on their first run. The fake responses written for Pydantic AI, the OpenAI Agents SDK and CrewAI were bare lists thatevaluate()could not detect. Lists of Pydantic AI messages, Agents SDKtool_call_itemitems and CrewAItool_nameentries are now auto-detected.The Anthropic capture example stored SDK content blocks, which
json.dumpcannot serialize; it now stores them as JSON.Behavior and safety findings are printed literally in the console (text in brackets from a tool result was read as Rich markup).
1.10.0 - 2026-10-03
Toolscore 1.10 scores what agents really did, not only which tools they named: record real MCP sessions or import OpenTelemetry spans, and see failed calls, required calls that never succeeded, leaked credentials and forbidden calls next to the score. Every new check was validated on real agents and real MCP servers, including GitHub’s official MCP server.
Highlights
Record real MCP sessions.
toolscore mcp record "<server command>" -o session.jsonis a transparent stdio proxy: put it in your MCP client config in place of the server, use your agent as usual, and every tool call is saved with its arguments, result, error and duration.toolscore eval gold.json session.jsonscores it directly.Behavior and safety checks. Every evaluation now reports failed tool calls, retries of a failed call with the same arguments, and credentials passed into tool arguments (API keys, tokens, private keys; reported with a redacted preview). Forbidden-call policies (
forbidden=in Python,--forbidden rules.jsonon the CLI,does_not_call(tool, **args)inexpect()) flag calls an agent must never make, and--fail-on-violationsturns them into a CI gate.Required calls that never succeeded are visible.
required_call_recallcounts each required call that was made and did not fail. The CLI printsRequired calls completed: X of Nwhen some are missing, and--weight required_call_recall=0.3(orweights=) makes them lower the score.MCP lint finds broken and hostile tool descriptions. References to tools the server does not expose (in descriptions, parameter descriptions and server instructions), and tool-poisoning patterns: hidden Unicode (tag characters, bidi controls), instructions to hide things from the user or to ignore other instructions (errors), and
<IMPORTANT>-style instruction blocks (warnings). On GitHub’s official MCP server (v1.12.2, 254 tool definitions across three toolset configurations) it reports the two real stale references and no false positives.OpenTelemetry import.
from_otel(),--format oteland auto-detection read tool calls from OpenTelemetry GenAI spans (execute_tool) and MCPtools/callspans, from OTLP JSON exports or SDK span objects, so any instrumented framework or observability platform can feed Toolscore.
Added
Traces keep what happened
Tool calls keep their
result,error,is_error,duration,cost,idand metadata when loaded from files or passed toevaluate();ToolCall.is_errortells whether a call failed.efficiency_metricsaddserror_count,error_rateandretry_after_error_count.EvaluationResult.to_dict()returns a complete, JSON-safe, versioned record (schema_version“2”): score, grade, weights,required_call_recall, all metrics, and every expected and actual call. Built for harnesses that store evidence, such as Agent Eval Flow.
Behavior and safety
required_call_recallmetric andEvaluationResult.required_call_recall: required calls completed, counting repeats (a contract that requiressearchtwice is half met by onesearch).Opt-in
required_call_recallscore weight (0 by default), also accepted byevaluate_trace(weights=...),expect(...).with_weights(...)andtoolscore eval --weight NAME=VALUE.security_metrics: credentials found in tool arguments at any depth (OpenAI, Anthropic, GitHub, AWS, Google, Slack and Stripe formats and PEM private keys), with the argument path and a redacted preview. OpenAI and Anthropic matches must also look random (digits and both letter cases), so slugs are not reported. No false positives on 861 real agent tool calls.redact_secrets()replaces credentials in any text.Forbidden-call policies:
evaluate(..., forbidden=[...])andevaluate_trace(..., forbidden=[...])reportpolicy_metricsandEvaluationResult.policy_violations. Rules name a tool and optional argument values or matchers.load_forbidden_rules()/rules_from_json()read JSON rules where values may be{"$regex": ...}(found anywhere in the value, likere.search, so a prefix or a second line does not hide it; lists are matched as their items joined with spaces),{"$contains": ...}or{"$one_of": [...]}. Policies do not change the score.expect(...).does_not_call(tool, **args)accepts arguments and matchers: forbidrun_shellonly when the command matchesrm -rf.Console, Markdown and HTML reports list behavior and safety findings (forbidden calls, credentials, failed calls, blind retries) and the required calls completed. The HTML and Markdown reports now show the score and grade. All three redact credentials wherever they would print them, so a Markdown report posted to a GitHub job summary does not publish a key; the JSON report and
to_dict()keep the calls as recorded.The JSON report’s
summaryaddsscore,grade,weights,required_call_recall,failed_calls,policy_violationsandsecrets, so CI scripts can read the verdict without recomputing it.toolscore eval --forbidden FILE,--weight NAME=VALUEand--fail-on-violations.
GitHub Action
New inputs
forbidden-fileandfail-on-violations(off by default) for a safety gate, and new outputsscore,grade,required-call-recallandviolations. Theformatinput acceptsmcpandotel.
Examples
examples/guardrails/: a deploy agent’s trace with a destructive command, a credential posted to a webhook and a failed deploy retried unchanged, withforbidden.jsonrules.examples/otel_genai_spans.json: an OTLP export written by the official OpenTelemetry Python SDK.The quality-gates workflow example gains a safety-check job.
MCP
toolscore mcp record(andMCPRecorder): records onlytools/callrequests and their responses, writes atomically, and exits with the server’s exit code.Lint rules for dangling tool references and tool poisoning;
lint_tools(tools, instructions=...)also checks the server’sinstructions.The scorecard reports the token cost of the server’s instructions alongside the tool definitions (
instructions_tokens,context_tokens).MCPStdioClient.server_instructionsandserver_capabilitiesfrom the handshake;MCPToolResult.textandcontent_to_text()render every MCP content type (text, embedded resources, resource links, images, audio).
Integrations
from_otel(),OTelAdapterand--format otelfor OpenTelemetry GenAI tool spans (OTLP JSON exports, span dicts, or SDKReadableSpanobjects). Arguments, results, call ids, errors (error.typeor an ERROR status) and durations are kept; calls are ordered by start time.
Fixed
MCP traces no longer contain phantom calls.
MCPAdapterturned each JSON-RPC response into a separateunknowntool call, which inflated call counts and lowered selection and sequence scores. Responses are now paired with their requests by id, and their result or error is attached to the call. Scores for MCP traces can change; re-approve baselines after upgrading.MCP sessions are auto-detected. With
--format auto, a recorded session ({"format": "mcp", "messages": [...]}) was routed to the OpenAI adapter and a plain JSON-RPC message list to the custom adapter; both loaded as zero calls.Embedded resources are kept. Tool results that return MCP
resourcecontent were reduced to an empty string.MCP server commands with spaces.
toolscore mcp list|lint|test|recordre-joined a multi-token command with spaces and split it again, so an argument containing a space (-- npx -y server "/path with spaces", as MCP client configs pass it) was broken in two. Several tokens are now used as given; a single quoted string is still split like a shell command.
Notes
The default composite score is unchanged. It judges the calls that were made, so a trace that skips required calls can still score well; use the
required_call_recallweight or the new console line to catch that.The
weightsreported byto_dict()and the JSON report now includerequired_call_recall(0.0 unless you set it). Passing the four existing weight names works as before.Missing-tool references and
<IMPORTANT>-style blocks are lint warnings; hidden Unicode and concealment or override instructions are errors, and lower the MCP scorecard’s lint score.A call counts as failed when it has
"is_error": trueor a non-emptyerror;"",null,{}and[]mean no error.
1.9.1 - 2026-10-01
Found by running toolscore mcp test against the official MCP reference servers (modelcontextprotocol/servers). Several failing grades were Toolscore’s mistakes, not the servers’.
Fixed
Union schema types. A property whose
typeis a list (["boolean", "string"], as in the official sequential-thinking server) crashed the scorecard withunhashable type: 'list', and the value generator producedNonefor it. Values are now generated for the first non-null type, and wrong-type probes match none of the listed types.Reproducible scenarios. Scenario values came from the unseeded global
random, so two runs against the same server could differ. Each tool now gets a generator seeded by its name.Optional fields are typed. The linter reported pydantic optional fields (
anyOf: [{"type": "string"}, {"type": "null"}]) andenum/const/$refproperties as “missing a ‘type’” (5 false errors on the official git server).Schema hints are used. Happy-path values now come from
examples, a non-nulldefault, an example quoted in the description (“e.g., ‘America/New_York’”), or a well-formed value forformat(uri, date-time, date, email, uuid, …) before falling back to synthetic values. The official time server previously received"sample_timezone", and its correct rejection was scored as a failure.
Known limitation
Servers that restrict paths to allowed roots (filesystem, git) still reject generated paths, which lowers their happy-path rate. Read those failures as “input outside the server’s sandbox”, not as server defects.
1.9.0 - 2026-09-28
Found while evaluating a real research agent (DeerFlow) with Agent Eval Flow + Toolscore: redundant_rate could not tell a looping agent from one running many different searches, and one missing call could zero the argument score of every later call.
Added
Identical-call (loop) metric.
efficiency_metricsnow also reportsidentical_countandidentical_rate: calls that exactly repeat an earlier call (same tool, same arguments, key order ignored).redundant_ratekeeps its meaning (calls beyond the gold’s per-tool expectation), so a research agent that runs many different searches is no longer indistinguishable from one stuck repeating the same call. Additive; composite scores are unchanged.
Fixed
Argument and side-effect matching now pairs calls one-to-one. Each expected call used to be matched to the first actual call with the same tool name at the same or a later position. One missing, extra or reordered call therefore shifted every later comparison, and a correct call could score 0. Expected calls are now paired with actual calls of the same tool by the best one-to-one assignment (exact for up to 12 calls per tool, greedy above). Examples: a missed earlier call went from
argument_f10.00 to 0.67; two same-tool calls in swapped order, and a wrong attempt followed by the right one, went from 0.00 to 1.00 (the extra attempt is still penalised byredundant_rateandsequence_accuracy). An agent that correctly calls no tools when none are expected now getsargument_f11.0 (was 0.0). Scores can rise for existing baselines and snapshots; re-approve after upgrading.Claude LLM judge works with current
anthropicSDKs. Recent SDK releases removedtemperaturefrommessages.create, so the Anthropic judge raisedTypeError: unexpected keyword argument 'temperature'.temperatureis now passed only when the installed SDK accepts it.
1.8.1 - 2026-06-19
This entry covers 1.7.0 through 1.8.1 (released 2026-06-13 to 2026-06-19).
Highlights
Snapshot testing — record, approve, replay. Stop hand-writing expected tool calls:
toolscore initscaffolds a suite, the firstpytestrun records your agent’s calls,toolscore approve --allblesses the baseline, and CI replays it forever. Jest snapshots for agents.MCP Scorecard & instant health-check.
toolscore mcp test "<server command>"— ortoolscore demofor a zero-setup sample server — auto-generates happy-path and edge-case scenarios from tool schemas, runs them, lints definitions, measures each tool’s context-token cost, and prints an A–F grade with a ranked Top issues to fix list and concrete fixes. Export Markdown reports and gate CI with--fail-underor--ci(writes the verdict to$GITHUB_STEP_SUMMARYand fails on blocking issues) — a fast, deterministic, offline quality check for MCP servers.Fluent
expect()API, matchers, and rich diffs.expect(agent).on(prompt).calls("tool", arg=ANY).does_not_call(...).with_score(0.9).run(), withANY/Regex/Approx/Contains/OneOf/IsTypematchers and aligned expected-vs-actual failure tables.Native everywhere. Raw responses from OpenAI, Anthropic, Gemini, LangGraph, Pydantic AI, OpenAI Agents SDK, Claude Agent SDK, and CrewAI (experimental) go straight into
evaluate()/expect()/snapshots — zero glue. Async agents viatest_agent_async()/.run_async().LLM judge for every provider. Optional semantic judging via OpenAI, Anthropic, Gemini, or any OpenAI-compatible endpoint (Ollama/vLLM/Groq) — one
judge=parameter and matching[llm]/[anthropic]/[gemini]extras.
Added
Snapshot Testing
snapshot_check(),Snapshot, andSnapshotStore— record-approve-replay state machine backed by plain JSON files under.toolscore/snapshots/toolscore_snapshotpytest fixture: records on first run, replays approved baselines, fails on drift, and prints a Jest-style terminal summary (toolscore: 1 snapshot created (pending approval), 5 passed)Pytest options
--toolscore-update(re-record + re-approve),--toolscore-snapshot-dir, and--toolscore-allow-pending;TOOLSCORE_RECORD_UPDATE=1mirrors--toolscore-updateCLI commands:
toolscore record(subprocess or--from-tracemode),toolscore approve [NAME|--all], andtoolscore snapshots list|show|rmCI-safe by design: snapshots are never created or auto-approved when the
CIenv var is set — missing/pending snapshots fail the build
MCP Scorecard
Zero-dependency MCP stdio client (
MCPStdioClient) with config-file support for Claude Desktop style files (--config/--server)Scenario harness: happy-path and edge-case scenarios generated from each tool’s input schema
Schema linting (
lint_tools) for missing descriptions, malformed schemas, undeclared required lists, and moreMCPScorecardwith an A–F grade blending happy-path pass rate (60%), edge resilience (20%), and lint cleanliness (20%)CLI commands:
toolscore mcp list,toolscore mcp lint,toolscore mcp testwith--cases,--no-edge-cases,--report md|json --output, and--fail-under A-FGitHub Action MCP mode: set
mcp-command(and optionallymcp-fail-under) to grade an MCP server in CI instead of running the eval path
Fluent API, Matchers & Diffs
expect()/Expectationfluent builder:.on(),.calls(),.then_calls(),.does_not_call(),.with_score(),.with_weights(),.with_strict_args(),.run(),.run_async()Argument matchers usable anywhere expected args appear:
ANY,Regex,Approx,Contains,OneOf,IsTypeRich failure diffs:
ToolScoreAssertionErrormessages now embed an aligned expected-vs-actual table with per-argument mismatches and targeted tips (colored on a TTY, plain text in CI logs)
Framework & Async Support
New extractors:
from_langgraph(),from_pydantic_ai(),from_openai_agents(),from_claude_agent_sdk(), andfrom_crewai()(experimental);auto_extract()detects all of them, including list-shaped message formatstest_agent_async()andexpect(...).run_async()for async agents; sync entry points raise a clearTypeErrorpointing at the async variant
Multi-Provider LLM Judge
JudgeConfigdataclass with provider inference from the model name (claude-*→ Anthropic,gemini-*→ Gemini,base_url→ any OpenAI-compatible endpoint, otherwise OpenAI)CLI flags
--llm-model,--llm-provider, and--llm-base-urlontoolscore eval(e.g. Ollama:--llm-model llama3.1 --llm-base-url http://localhost:11434/v1)New extras:
tool-scorer[anthropic]andtool-scorer[gemini]
Scaffolding & Quality
toolscore initreworked into a framework-detecting wizard: detects your agent framework (LangGraph, Pydantic AI, OpenAI Agents SDK, Claude Agent SDK, CrewAI, raw SDKs, or generic), writes a pytest suite that passes immediately, and adds a snapshot-replay GitHub Actions workflowevaluate()validates inputs:TypeErrorfor non-listexpected,ValueErrorfor unknown, negative, or non-finite weight keys;assert_tools()/test_agent()validatemin_scorerange earlyassert_score()onToolscoreAssertionsand thetoolscore_assert_toolsfixture bridge the pytest plugin to the in-memory APIpy.typedmarker (PEP 561) — mypy/pyright now see inline annotationsStrict argument comparison mode (
strict=True/.with_strict_args()): pure equality, no int/float coercion or string stripping
Changed
This release intentionally changes a few behaviors. Review these before upgrading:
evaluate_trace()takes a singlejudgeparameter. The olduse_llm_judge,llm_judge_model, andllm_judge_api_keykeyword arguments are gone. Passjudge=False(default),judge=True, a model-name string, or aJudgeConfig— e.g.evaluate_trace(gold, trace, judge=JudgeConfig(model="gemini-2.0-flash")).Composite-score weights are renormalized. Custom
weights=are merged with the defaults and scaled so they sum to 1.0 before the composite score is computed. Scores produced with partial weight overrides may differ from previous releases; the relative ordering of metrics you emphasized is preserved.Omitted gold arguments now mean “do not check arguments”. An expected call with
argsomitted (ornull) is a tool-name-only expectation: the tool must be called, but any arguments are accepted. An explicit"args": {}keeps its strict meaning — “expect this tool to be called with zero arguments”. This affectsargument_f1,tool_correctness, trajectory, the composite score, gold-file loading, the fluent.calls("tool")(no kwargs = don’t check args), and failure-diff rendering.ToolCall.argspreservesNone. It is no longer coerced to{}on construction, keeping “do not check” (None) distinct from “expect zero args” ({}). Code that assumed.argsis always a dict should handleNone.The
min_accuracypytest marker is removed. It was dead code; useassert_tools(min_score=...), thetoolscore_snapshotfixture, or thetoolscore_asserthelpers instead.Importing
toolscoreno longer creates atraces/directory. Trace capture creates its output directory lazily on first write, so simply importing the package leaves your filesystem untouched.Cost estimator pricing refreshed (February 2026), including a
claude-opus-4-6entry.
Fixed
Zero-argument tool calls now score a perfect argument F1 when matched exactly (instead of being penalized as having no overlapping args)
evaluate()routesactualthroughauto_extract(), so list-shaped raw formats (Claude Agent SDK / LangGraph message lists) are detected even when passed as plain listsLLM judge batching falls back to per-pair requests only on parse failures; transport and auth errors propagate instead of fanning out into doomed retries
MCPStdioClient.list_tools()guards against runawaynextCursorpagination loopsArgument comparison recurses strictly through nested dicts and lists
JudgeConfigis exported from the package root
1.6.0
Added - Instant Value: Zero-Friction API
Auto-Detect Provider Responses
auto_extract()— auto-detect OpenAI, Anthropic, and Gemini responses and extract tool callsevaluate()andassert_tools()now accept raw provider responses as theactualargument — no need to import or callfrom_openai()/from_anthropic()/from_gemini()manuallySupports response objects (with
model_dump()), plain dicts, and already-formatted lists
End-to-End Agent Testing
test_agent()— run an agent callable, extract tool calls, evaluate, and optionally assert a minimum score, all in one callAccepts any callable that returns an LLM response (raw or pre-formatted)
Data-Driven Pytest Decorator
@toolscore.cases()— parametrize pytest test functions with a list of test-case dictsThin wrapper around
pytest.mark.parametrizewith automatic key extraction and test IDsLazy pytest import avoids breaking non-pytest users
1.5.0
Added - In-Memory API, Integration Helpers & Simplified Output
In-Memory Python API
New
evaluate()function accepting Python dicts directly - no file I/O requiredNew
assert_tools()one-liner for pytest:assert_tools(expected, actual, min_score=0.9)Composite
.scoreproperty onEvaluationResult(weighted average of key metrics)Convenience properties:
.selection_accuracy,.argument_f1,.sequence_accuracyCustom weights support for composite score calculation
ToolScoreAssertionErrorwith detailed failure messages
Integration Helpers (toolscore.integrations)
from_openai(response)- extract tool calls from OpenAI ChatCompletion responsesfrom_anthropic(response)- extract tool calls from Anthropic Message responsesfrom_gemini(response)- extract tool calls from Google Gemini responsesWorks with both response objects and plain dicts
Supports modern and legacy formats (e.g.,
tool_callsandfunction_callfor OpenAI)
Simplified CLI Output
Default output now shows 4 key metrics: Overall Score, Selection Accuracy, Argument F1, Sequence Accuracy
PASS/WARN/FAIL verdict with overall score
Full detailed output available with
--verboseflagAdded
toolscoreas CLI alias alongsidetool-scorer
README & Positioning
New tagline: “Lightweight tool-call testing for LLM agents - deterministic, local, zero API cost”
Leads with 3-line Python API example
Honest comparison table including DeepEval, Ragas, and Inspect AI
“When to use Toolscore vs. alternatives” section
Advanced features moved to dedicated section
1.4.0 - 2026-01-09
Added - Self-Explaining Metrics, Regression Testing & GitHub Action
Self-Explaining Metrics
Know exactly WHY your agent failed with detailed explanations after each metric
Automatic detection of tool name mismatches and similar names using SequenceMatcher
Actionable tips like “use –llm-judge to catch semantic equivalence”
Per-metric breakdowns showing MISSING, EXTRA, and MISMATCH items with severity levels
New
toolscore/explainer.pymodule with comprehensive explanation generationCategories: missing tools, extra tools, argument mismatches, type errors, value mismatches
Tips tailored to specific failure patterns (low precision vs low recall, etc.)
Impact: Users immediately understand what went wrong without manual debugging
Regression Testing (toolscore regression)
New CLI command for CI/CD regression detection
Save baselines with
--save-baselineflag onevalcommandAutomatic PASS/FAIL with configurable thresholds (default: 5%)
Detailed delta reports showing improvements and regressions for each metric
Exit codes: 0=PASS, 1=FAIL (regression), 2=ERROR
Baseline includes:
Version tracking
Timestamp
Gold file hash for verification
All core metrics
Comparison shows:
Baseline vs current values
Absolute delta and percentage change
Status per metric (REGRESSION/IMPROVED/OK)
Impact: CI/CD pipelines can automatically catch agent degradation
GitHub Action
Official GitHub Action for one-click CI setup
Available on GitHub Actions Marketplace
Supports both threshold and regression testing modes
Features:
Automatic HTML report generation as artifacts
Job summary with evaluation results
Configurable accuracy thresholds
Regression testing against baselines
All trace format support
Example usage:
- uses: yotambraun/toolscore@v1 with: gold-file: tests/gold_standard.json trace-file: tests/agent_trace.json threshold: '0.90'
Impact: Zero-config CI/CD setup for any repository
Changed
Enhanced console output with “What Went Wrong” section showing top issues
Tips section now shows actionable suggestions based on detected problems
Metrics table now shows self-explaining descriptions (e.g., “3 of 4 correct”)
Removed redundant “Suggestions for Improvement” section (replaced by new explainer)
New Files
toolscore/explainer.py- Self-explaining metrics generationtoolscore/baseline.py- Baseline save/load/compare for regression testingaction.yml- GitHub Action definition
1.2.0 - 2025-10-28
Added - 🎯 Multi-Provider Support & Export Formats
🤖 Google Gemini Adapter
Full support for Google Gemini function calling traces
Auto-detection for Gemini response format
Handles multiple Gemini format variations:
candidateswithfunctionCall(camelCase)function_call(snake_case) alternative formatDirect
partslist formatMixed content with text and function calls
Comprehensive test coverage (72.82%)
Impact: Now supports all major LLM providers (OpenAI, Anthropic, Gemini)
📊 CSV Export (--csv)
Export evaluation results to CSV format for Excel/Google Sheets
Human-readable formatting with percentage values
Flattened metrics structure for easy sorting/filtering
Ideal for sharing results with non-technical stakeholders
94.59% test coverage
Impact: Business teams can analyze results in familiar spreadsheet tools
📝 Markdown Export (--markdown)
Export evaluation results to Markdown format for GitHub/docs
Beautiful tables with status indicators (Excellent/Good/Fair/Needs Improvement)
Collapsible details sections for clean PR comments
Automatic timestamp and metadata
Perfect for CI/CD workflows and pull request comments
81.38% test coverage
Impact: Seamless integration with GitHub workflows
💰 LLM Cost Estimation
Built-in cost tracking with
calculate_llm_cost()functionToken estimation with
estimate_tokens()functionTrace-level cost estimation with
estimate_trace_cost()Cost savings calculator with
calculate_cost_savings()Up-to-date pricing for October 2025 models:
OpenAI: GPT-5 (\(1.25/\)10), GPT-5-mini, GPT-5-nano, GPT-4o, GPT-4o-mini
Anthropic: Sonnet 4.5 (\(3/\)15), Haiku 4.5 (\(1/\)5), Opus 4.1 (\(15/\)75)
Google: Gemini 2.5 Pro, 2.5 Flash, 2.5 Flash-Lite, 2.0 Flash
Legacy model support for backward compatibility
Impact: Quantify ROI and optimize agent costs
🔧 CI/CD Integration Template
Ready-to-use GitHub Actions workflow (
.github/workflows/toolscore-example.yml)Automatic PR comments with evaluation results
Quality gates with configurable thresholds
CSV/Markdown/HTML report generation
Impact: Zero-config CI/CD setup
🛤️ Trajectory Evaluation
Multi-step path analysis with
calculate_trajectory_accuracy()Evaluates reasoning PATH taken by agent, not just final result
Step-by-step comparison with detailed trajectory analysis
Path efficiency metrics (penalizes unnecessary detours)
Partial trajectory matching for flexible evaluation
89.29% test coverage with 13 comprehensive tests
Impact: Industry-standard evaluation (matches BFCL V3/V4 capabilities)
🔌 MCP (Model Context Protocol) Adapter
Full support for Anthropic’s Model Context Protocol (JSON-RPC 2.0)
Auto-detection for MCP message format
Handles tool requests, results, and error responses
Batch call support
93.10% test coverage with 20 comprehensive tests
Impact: Future-proof support for emerging open standard
📦 Production Trace Capture
@capture_tracedecorator for capturing real agent executionsAuto-save production traces as JSON test cases
Convert captured traces to gold standard format
Manual tool capture API with
TraceCaptureclassImpact: Closes production→testing feedback loop
🔍 Enhanced State Validators
FileSystemValidator: Content validation (file contains text, size constraints)
SQLValidator: Row-level validation (WHERE conditions, specific row matching)
Deeper validation beyond simple existence checks
Impact: State-based evaluation like BFCL V4
Changed
Enhanced README: Complete repositioning as “pytest for LLM agents”
Improved SEO: Expanded PyPI keywords from 16 to 40+ for better discoverability
Updated Comparison Table: Now compares against real competitors (LangSmith, OpenAI Evals, W&B)
CLI Enhancement: Added
--csvand--markdownflags toevalcommandFormat Support: Added “gemini” option to all format-related commands
Testing
Increased test coverage from 47.80% to 55.05% (+7.25%)
Added 63 comprehensive tests across new features (31 from initial features, 32 from advanced features)
All 215 tests passing with zero bugs
Strict mypy type checking compliance maintained
New test suites:
13 trajectory evaluation tests
20 MCP adapter tests
Enhanced validator tests
1.1.0 - 2025-10-18
Added - 🎯 Week 2: Major UX & Developer Experience Improvements
🚀 Zero-Friction Onboarding (toolscore init)
Interactive CLI command for project setup in 30 seconds
Choose from 5 pre-built agent types (Weather, E-commerce, Code, RAG, Multi-tool)
Automatically generates gold standard templates, README, and example files
Impact: Onboarding time: 1+ hour → 30 seconds
⚡ Synthetic Test Generator (toolscore generate)
Generate comprehensive test cases from OpenAI function schemas
Automatic edge case and boundary value generation (60% normal, 20% boundary, 20% edge)
Smart value generation based on parameter names (email, url, query, etc.)
Schema validation metadata extraction
Impact: Test creation time: hours → 30 seconds
📊 Quick Compare (toolscore compare)
Compare multiple model traces side-by-side in single command
Color-coded performance comparison table
Automatic ranking per metric with best model highlighted
Overall winner calculation with weighted average scores
JSON comparison report export
Impact: Multi-model benchmarking: manual spreadsheet → 1 command
🔍 Interactive Debug Mode (--debug)
Step-by-step failure analysis with
--debugflag on eval commandInteractive navigation through mismatches (next/previous/quit)
Side-by-side expected vs actual comparison tables
Context-specific fix suggestions for each failure type
Detailed failure categorization:
Missing tools (expected but never called)
Extra tools (called but not expected)
Tool name mismatches
Argument mismatches with field-by-field comparison
Missing calls (trace ended early)
Extra calls (redundant invocations)
Impact: Debugging: manual JSON diffing → guided walkthrough
💡 Actionable Error Messages
Automatic detection of common failure patterns during evaluation
Specific fix suggestions displayed in console output
Suggests
--llm-judgefor tool name mismatchesSuggests
--verbosefor schema validation errorsSuggests reviewing logic for missing tools
Suggests checking arguments for type/value errors
Impact: Users know exactly what to fix instead of guessing
Added - 🎯 Week 1: Core Evaluation Features
Tool Correctness Metric
New metric measuring whether ALL expected tools were called
Complements selection accuracy by checking coverage vs per-call matching
Reports
missing_toolsandextra_toolslistsDeterministic evaluation without LLM needed
Integrated LLM-as-a-Judge
Semantic evaluation now built into core evaluation engine
Simple
--llm-judgeCLI flag (no separate script needed)Catches semantically equivalent tool names (e.g., “search” vs “web_search”)
Configurable model selection with
--llm-modeloptionPreviously: Separate script in metrics directory
Now: Integrated with single flag
Parameter Schema Validation
Validate argument types (string, integer, number, boolean, array, object)
Numeric constraints (minimum, maximum)
String constraints (minLength, maxLength, pattern regex)
Enum validation for allowed values
Required field checking
Detailed error reporting with field-level validation failures
Define schemas in gold standard metadata:
{ "metadata": { "schema": { "query": {"type": "string", "minLength": 1}, "limit": {"type": "integer", "minimum": 1, "maximum": 100} } } }
Example Datasets
5 realistic gold standard templates included:
weather_agent.json(Beginner - API lookup)ecommerce_agent.json(Intermediate - Shopping workflow)code_assistant.json(Intermediate - Code search/edit)rag_agent.json(Advanced - Retrieval pipeline)multi_tool_agent.json(Advanced - Research workflow)
Each includes schema validation examples and descriptions
Located in
examples/datasets/directory
Added - 🎯 Previous Features
LLM-as-a-judge metrics (now integrated): Optional semantic correctness evaluation using OpenAI API
calculate_semantic_correctness()function for single evaluationscalculate_batch_semantic_correctness()for batch processingDetects semantically equivalent tool calls beyond exact string matching
Supports custom models (default: gpt-4o-mini)
LangChain adapter: Support for LangChain agent traces
Legacy AgentAction format (
tool,tool_input,log)Modern ToolCall format (
name,args,id)Alternative action/action_input format
Auto-detection support
Comprehensive test suite increasing coverage from 37% to 80%+
Complete Sphinx documentation with ReadTheDocs integration
Interactive Jupyter notebook tutorials (quickstart, custom formats, advanced metrics)
Rich-formatted console output with color-coded metrics tables
Pytest plugin for seamless test integration
Python-semantic-release configuration for automated versioning
Optional dependency groups:
llm,langchain,all
Changed
Enhanced console output with new tables:
Tool Correctness metrics table
Schema Validation metrics table
Actionable suggestions section
Improved CLI help text for all commands
Updated CLI to include all new commands:
init,generate,compareEnhanced documentation with comprehensive examples
Improved README with “What’s New in v1.1” section
Better command organization in help output
Fixed
Windows console Unicode compatibility (removed emoji characters causing UnicodeEncodeError)
SQLValidator now supports multiple database field name variations
CLI tests updated for correct Click exit codes
Moved manual test files to proper
tests/manual/directory
0.1.0 - 2025-10-13
Added
Initial release of Toolscore
Core evaluation engine for LLM tool usage
Support for OpenAI, Anthropic, and custom trace formats
Comprehensive metrics:
Invocation accuracy
Selection accuracy
Sequence edit distance
Argument F1 score
Redundant call rate
Side-effect validation (HTTP, filesystem, database)
Performance metrics (latency, cost)
CLI with
evalandvalidatecommandsJSON and HTML report generation
Side-effect validators for HTTP, filesystem, and SQL operations
Format auto-detection
Adapters for multiple LLM providers
Documentation
README with quick start guide
Example files for all supported formats
API documentation
Usage examples