Skip to content

Implement argument constraints for tool evals#10

Merged
andreban merged 2 commits intomainfrom
tools-evals-constraints
Feb 6, 2026
Merged

Implement argument constraints for tool evals#10
andreban merged 2 commits intomainfrom
tools-evals-constraints

Conversation

@andreban
Copy link
Member

@andreban andreban commented Feb 6, 2026

Adds support for flexible argument matching in tool evaluations using constraint operato rs.
Key changes:

  • Implemented matchesArgument in src/matcher.ts supporting:
    • $pattern (Regex match)
    • $contains (Substring match)
    • Numeric constraints ($gt, $gte, $lt, $lte)
    • $type (Type assertions)
    • $any (Presence check)
  • Added comprehensive tests in src/test/matcher.test.ts.
  • Documented constraints in README.md

Adds support for flexible argument matching in tool evaluations using constraint operato
rs.
Key changes:
- Implemented matchesArgument in src/matcher.ts supporting:
  - `$pattern` (Regex match)
  - `$contains` (Substring match)
  - Numeric constraints (`$gt`, `$gte`, `$lt`, `$lte`)
  - `$type` (Type assertions)
  - `$any` (Presence check)
- Added comprehensive tests in src/test/matcher.test.ts.
- Documented constraints in README.md
- Adds missing license header to `matcher.test.ts`.
Copy link
Collaborator

@beaufortfrancois beaufortfrancois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -1,3 +1,3 @@
{
"name": "webmcp-evals-cli",
"version": "0.1.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update version or not?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still considering this as "under heavy development", so haven't, but happy to otherwise.

@andreban andreban merged commit 307b37a into main Feb 6, 2026
2 checks passed
@beaufortfrancois beaufortfrancois deleted the tools-evals-constraints branch February 13, 2026 09:20
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.

2 participants