Skip to main content
Glama

rematch_emails

Destructive

Assign still UNASSIGNED mails (incoming and sent via send_email) to the records that match their counterpart address. Scope: contact_id (all addresses of that person: main e-mail + additional e-mails), account_id (the organisation's e-mail) or since (ISO date: every unassigned mail since then). Exactly one match → assigned (assignment_state 'auto'); a person, their lead and their organisation count as ONE match. Several different matches → nothing is assigned, the candidates are stored (assignment_state 'ambiguous') for a human to pick with assign_email. Mails whose assignment a human removed are left alone. Runs automatically after create_contact, update_contact (new e-mail) and upsert_contact_point (kind email). Optional: dry_run=true only reports. Max 500 mails per call (more → call again).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "rematch_emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
sinceNoISO date/time
dry_runNoOnly simulate and report what would happen; change nothing
account_idNoID of the account (company)
contact_idNoID of the contact

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / account_id / description
      Added value: +"ID of the account (company)"
    • addedInput schema / properties / contact_id / description
      Added value: +"ID of the contact"
    • addedInput schema / properties / dry_run / description
      Added value: +"Only simulate and report what would happen; change nothing"
  2. First observed

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations it discloses the resulting assignment_state values ('auto' vs 'ambiguous'), what happens on multiple matches (nothing assigned, candidates stored), and the automatic invocation triggers after create_contact, update_contact and upsert_contact_point. This is substantial behavioral detail for a mutating tool flagged destructiveHint=true, and nothing conflicts with those hints.

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?

Dense but front-loaded: the core action and scope come first, then match rules, then side effects, then constraints. No filler sentences, and the parenthetical qualifiers earn their place by preventing misreads.

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

Completeness5/5

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

For a four-parameter, no-output-schema mutation tool, the definition covers inputs, matching logic, ambiguity handling, safety carve-outs, batch limits, and automatic triggers. An agent has everything needed to invoke it correctly without further inspection.

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

Parameters5/5

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

Schema coverage is 100%, yet the description still adds meaning: contact_id expands to main plus additional e-mails, account_id means the organisation's e-mail, since is an ISO date covering all unassigned mail from then, and dry_run only reports. Semantic expansion beyond the schema is the value here.

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?

States a specific verb and resource ('Assign still UNASSIGNED mails') and narrows the population precisely: incoming mail plus mail sent via send_email, matched on counterpart address. An agent can distinguish this from assign_email (human-driven picking) purely from the text.

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

Usage Guidelines5/5

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

Explicitly enumerates the three scoping options (contact_id, account_id, since), explains the exactly-one-match rule including that a person/lead/organisation counts as one match, and routes ambiguous cases to assign_email. It also states exclusions ('mails whose assignment a human removed are left alone') and the 500-mail cap with the 'call again' remedy.

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.