Skip to main content
Glama

Match Records

match_records
Destructive

Perform real-time identity resolution on up to 100 records. Returns run_id, match_count, record_count, match_rate, amount_charged, and records[] — one output record per input record, matched or not (each with row_id, iag_person_id, match_level, match_type, match_confidence, enrichment fields, and the licensing labels below). iag_person_id is an org-scoped, non-reversible id: present on a real match, or a best-effort id derived from the row's own identity signals (or null) when unmatched — use match_count/record_count, not id-presence, to tell real matches from derived-only rows. Each record also carries resolution_action (resolved = organic PII match, refreshed = the row submitted a valid iag_person_id, unmatched = no real match, identity_unavailable = a previously valid id no longer resolves to deliverable data) and license_action (none, started, or renewed), plus license_expires_at (ISO-8601 or null) — these two fields are independent: a row can be resolution_action "resolved" and license_action "renewed" at once. The run_id can be passed immediately to get_match_run to retrieve or audit this call later. Billing: emits usage per matched record only — derived-only rows are free; amount_charged is a conservative pending-usage estimate, not a finalized invoice amount. A tier-01 Person ID from a prior real match or licensed audience delivery can go directly to Refresh; an audience-only ID has null match_level until a real match occurs. Include I in match_level for direct ID lookup, or omit the filter. An active license avoids another identity-license charge. For more than 100 records, use create_segment(subtype="matched") with a file upload instead. Requires 'creator' scope.

Input Schema

NameRequiredDescriptionDefault
recordsYesArray of 1–100 records to match. Each record is a key-value object of identity fields: email, phone, full_name (or first_name/middle_name/last_name/name_suffix), address_1/address_2/city/state/zip, dob, iag_person_id. If full_name is provided without first_name/last_name, the engine parses it into components automatically. Pre-hashed clients may submit email_sha256/phone_sha256 (lowercase-hex SHA-256) instead of raw email/phone — do not submit an already-hashed value in the raw field, it will be hashed a second time and never match. Extra permutations beyond the primary identity fields may be supplied as emails[]/phones[]/addresses[]/emails_sha256[]/phones_sha256[] arrays. Each addresses[] entry is read by exact key: address_1, address_2, city, state, zip (zip5/postal_code/zip_code accepted as ZIP aliases); any other key is ignored.
field_listNoOptional list of output fields to include in matched records
match_levelNoRestrict identity resolution to these match levels (Individual/Household/Digital/Spatial/Address). Omit to use the platform default (all levels).
template_idNoOptional enrichment template ID to apply
spatial_modeNoSpatial trade-area mode. residential is the default; use work for workplace-oriented spatial matching, or auto for dynamic commercial workplace routing.residential

Output Schema

NameRequiredDescriptionDefault
run_idYes
recordsYes
guidanceNoInterpretation or recovery guidance for this result
count_unitNo
match_rateYes
page_countNoNumber of objects on this page, not the organization total
count_stateNoUnknown means no count; available does not guarantee freshness. Recount for a current value.
match_countYes
next_actionsNoSuggested next calls using returned IDs and available scopes. Not executed and not user consent.
record_countYes
money_displayNoCurrency amounts formatted once from source paths ending in _cents. Use verbatim; do not divide again. Null/missing source amounts are omitted, not zero.
amount_chargedYesPending usage estimate in USD, not a finalized invoice
population_inputNoPopulation input used for the preview; IDs refer to their current saved definitions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes far beyond the annotations: discloses the billing model (usage per matched record only, derived-only rows free, amount_charged is a pending estimate not an invoice), the 'creator' scope requirement, and the non-obvious semantics of iag_person_id (org-scoped, non-reversible, best-effort derived id on unmatched rows — use match_count/record_count rather than id-presence to distinguish). It also explains the independent resolution_action and license_action axes with a concrete combined case.

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

Conciseness3/5

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

The purpose and return contract are front-loaded, which is good, but the body collapses into a single dense run-on paragraph mixing billing, ID semantics, action enums, and filtering advice. The sentence "Include I in match_level for direct ID lookup, or omit the filter" is cryptic and buried mid-paragraph where it is easy to miss.

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?

Despite an output schema existing, the description supplies the interpretation layer that the schema cannot: what each action value means, how the two action fields interact, and how to determine real matches from derived rows. Scope requirements, billing caveats, and the scale-up alternative are all covered, leaving nothing an agent needs to call this correctly.

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%, so the baseline is 3. The description still adds real meaning on top: it clarifies that a tier-01 Person ID from a prior real match can go straight to Refresh while an audience-only ID has null match_level, and gives guidance on match_level filtering. The remaining parameters (template_id, spatial_mode, field_list) are left entirely to the 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?

Opens with a specific verb and resource ("Perform real-time identity resolution on up to 100 records") and immediately establishes the scope limit and the inline-record input shape. It is clearly distinct from sibling tools like create_segment and get_match_run, which it names as complements rather than substitutes.

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?

Gives an explicit routing rule for large batches ("more than 100 records, use create_segment(subtype=\"matched\") with a file upload instead") and points to get_match_run for later retrieval. It also warns that an active license avoids another identity-license charge. It stops short of contrasting against other match-adjacent siblings such as deliver_file_match or list_match_runs, so it is strong but not exhaustive.

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.

Resources