Skip to content

feat: add tool-call scorer - #55

Merged
royalpinto007 merged 2 commits into
AgentPostmortem:mainfrom
sharadvc:feat/tool-call-scorer
Sep 17, 2026
Merged

royalpinto007 merged 2 commits into
AgentPostmortem:mainfrom
sharadvc:feat/tool-call-scorer

Conversation

@sharadvc

Copy link
Copy Markdown
Contributor

Fixes #39

Agent evals need "did the model emit a callable action" — json-schema has no function-call semantics.

Change

  • New src/scorers/tool-call.ts (parse-then-validate shape like json-schema.ts).
  • Registers the new tool-call type in registry.ts builtinScorers.
  • Parses output as JSON and requires {name, arguments}: name must be in the allowedTools allowlist, and arguments must be a plain object. Optional per-tool schemas reuse the validate() helper.
  • Documented in README scorer table + CHANGELOG [Unreleased].

Acceptance

  • ctx('{"name": "get_weather", "arguments": {"city": "London"}}') with allowedTools: ["get_weather"] passes.
  • {"name": "rm_rf", ...} or non-JSON output fails.

Full suite: 113/113 pass (npm test); tsc --noEmit and eslint clean.

This contribution was made with AI assistance (Claude).

MapleTheBot and others added 2 commits September 17, 2026 08:53
Parses output as JSON and requires a tool call: name on the
allowedTools allowlist and arguments as a plain object, with
optional per-tool argument schemas reusing validate().

Closes AgentPostmortem#39
@royalpinto007
royalpinto007 merged commit 0b481b5 into AgentPostmortem:main Sep 17, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown

Merged. Thanks a lot, @sharadvc.

Evalgate gets better every time someone outside the repo digs in like this.

If you find Evalgate useful, consider dropping a star. It helps more people find it.

Happy to see more from you whenever you have the time.

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.

New scorer tool-call: tool-call format for agentic evals

2 participants