Skip to main content
Glama

Query Search Runs

query_search_runs
Read-only

To see the people or companies one run found, pass its id to query_agent_people as a {"column_key": "run", "operator": "is_any_of", "values": [run ids as strings]} filter, for the people it found still on the agent, or to query_search_results as run_id, for the rows of the people or companies it found on the list it saved to (none for a 'user_added' run, which saves to no list). Both include the rejected ones. A dict with runs and total, the number of matching runs; page with offset += limit while offset + limit < total. Each run carries id; source, the discovery tool as the source column of query_search_results names it, or 'user_added' for people the user added; entity_type, 'person' or 'company', what it looks for, set even when it found no one; arguments, what the run was called with (for a Websets run, its list's search settings) and, unless the run's source is 'user_added', list_name, the list it saved to, even when the call named none; started_at; finished_at, null while a Websets search is still running; found, the people or companies it returned, ones the agent already had included; matched and filtered_out, those whose row in the list the run saved to is qualified or rejected now (both 0 for people the user added, who get no list row); and new, those this run brought to the agent: no earlier run returned them and they weren't on the agent before it started.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoRuns per page (default 50, max 200).
offsetNoRuns to skip for paging (default 0).
agent_idYesThe agent whose search runs to list.
person_idNoOnly the runs that found this person (the person `id` query_agent_people returns).
company_idNoOnly the runs that found this company (a row's `company_profile_id`).
entity_typeNoOnly the runs that look for people ('person') or for companies ('company'); omit for both.
on_behalf_ofNoAn agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / entity_type / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      "person",
      -      "company"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "person",
      +      "company"
      +    ],
      +    "title": "EntityType",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / on_behalf_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "An agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."
      +}
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

With only readOnlyHint=true in annotations, the description carries the rest and does so richly: paging via offset += limit while offset + limit < total, finished_at null while a Websets search is still running, matched/filtered_out computed as of now, the exact definition of 'new', and that user_added runs save to no list. This is substantive behavioral context beyond the annotation.

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

Conciseness4/5

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

The <summary>/<returns> structure is front-loaded and purposeful, and every claim about return fields earns its place given there is no output schema. The returns block is dense and long, verging on over-specification, which keeps it from a 5.

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 7-parameter read tool with no output schema, the description compensates by fully enumerating the return fields (id, source, entity_type, arguments, list_name, started_at, finished_at, found, matched, filtered_out, new) and their edge cases. An agent has everything needed to call and interpret it.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3; the schema already documents limit, offset, agent_id, person_id, company_id, entity_type, and on_behalf_of. The description's parameter-relevant contribution is mainly the run-id-as-string filter syntax for a different tool, and most of its prose describes return fields rather than the input parameters.

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 states a specific verb+resource ('List the searches that found an agent's people and companies') and defines precisely what a 'run' is, including all four kinds of events it covers. It distinguishes itself from the closest siblings (query_agent_people, query_search_results) by naming them and describing the routing between them.

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?

It gives clear routing guidance: to see what a run found, pass its id to query_agent_people or query_search_results, with the exact filter shape. It does not explicitly state when NOT to use this tool or contrast its scope against query_search_results at a top level, so it stops short of full when/when-not coverage.

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