Skip to main content
Glama

SNHP — free negotiation math + agent memory

Stable matching (Gale–Shapley)

stable_match
Read-only

Match two groups by their rankings so no pair wants to swap — free, no account or key needed.

A STABLE matching: USE THIS WHEN you're assigning two sides to each other by mutual preference — interns<->teams, students<->schools, mentors<->mentees — and want a result with no "blocking pair" (no person+slot that both prefer each other over what they got).

Provide proposers and receivers, each a list of {"id": name, "preferences": [ids of the OTHER side, most-wanted first]}. Receivers may add "capacity" (default 1) to accept several. Returns {matching (name -> name), unmatched_proposers, blocking_pairs (empty list = provably stable), n_proposals}. NOTE: the result is PROPOSER-optimal, so put the side you want to favor in proposers.

Example: stable_match( proposers=[{"id":"Ana","preferences":["Growth","Core"]}, {"id":"Ben","preferences":["Core","Growth"]}], receivers=[{"id":"Growth","preferences":["Ben","Ana"]}, {"id":"Core","preferences":["Ana","Ben"]}]) -> matching {"Ana":"Growth","Ben":"Core"}, blocking_pairs [].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proposersYesList of {id, preferences:[ids of the OTHER side, most-wanted first]}. The result is PROPOSER-optimal — put the side you want to favor here.
receiversYesList of {id, preferences:[...], capacity (optional, default 1)}.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
matchingNo
n_proposalsNo
blocking_pairsNo
unmatched_proposersNo

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond readOnlyHint=true and openWorldHint=false, description details the algorithm's properties (proposer-optimal, free, no account needed), return fields (matching, unmatched_proposers, blocking_pairs, n_proposals). No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is front-loaded with purpose, then usage, parameter format, output, and example. Every sentence is necessary and no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers all key aspects: purpose, when to use, parameter semantics, output structure, and example. Slight lack of error handling or edge cases, but sufficient for a well-defined algorithm.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds meaning: explains the format of proposers and receivers, notes capacity is optional, and highlights proposer-optimality. Example clarifies usage beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it matches two groups by rankings to achieve stable matching, with concrete examples (interns-teams, students-schools). It distinguishes from sibling tools which focus on auctions, negotiations, or memory/storage.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'USE THIS WHEN' and lists appropriate scenarios. Lacks explicit 'when not to use' but context makes it clear it's for bipartite matching with preferences.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4/5.0
Disambiguation4/5

Most tools have distinct purposes (e.g., auctions, negotiation, pricing, matching, memory). However, negotiate/session_advise and negotiate_bundle/session_bundle overlap in functionality, differing only in payment tier, which could cause confusion.

Naming Consistency4/5

Tool names generally follow a verb_noun pattern in snake_case. 'negotiate' is a lone verb without a noun, but overall the convention is consistent and predictable.

Tool Count4/5

15 tools cover a broad domain of negotiation, auctions, pricing, matching, and memory. While slightly on the higher side, each tool serves a clear purpose and the count is reasonable for the scope.

Completeness4/5

The tool surface covers key negotiation scenarios (single/multi-issue, free/paid, auctions, clearance pricing, stable matching) and adds memory persistence. Minor gap: no explicit tool for managing user preferences or profiles.