Skip to main content
Glama

Fetch entity records by id

entity_fetch

Collect full/projected Coresignal records by id — billed per record found.

Exactly one of ids or cache_id is accepted. One call is a whole collection, not a page of one: there is no continuation handle, and the hard ceiling on it is quoted in limit. More than limit is answered by a higher limit; more than that ceiling by a narrower query. The fan-out is paced to the lowest Coresignal plan limit, so a full collection takes ~200s and will not finish inside one call; its size, the per-record rate and its credit total are all quoted in limit. The field scope is settled before any credit is spent: the default field_mode='ask' asks the user when the client supports MCP elicitation, and otherwise hands the choice back unbilled. Custom field names come from the dynamic evidence rows in entity_search, resolved via entity_fields.

All records are collected via a single paced /collect fan-out. A small id/identity floor is always present; custom fields add to it. Not-found / stale ids are skipped (not billed), so the returned ids are a subset of those requested and the difference is the misses.

Returns: str: JSON. inline -> {delivery:"inline", entity_type, count, fields, records, credits_consumed}. url -> {delivery:"url", url, count, fields, reason, credits_consumed} (no sample — the records are in the file). On the cache_id path both shapes also carry total_count (how many the query matched upstream) and truncated (true when the query matched ids this call never requested — reachable by a higher limit, or past that ceiling a narrower query, since nothing continues a collection; not-found ids alone never set it). A warning means something failed AFTER records were billed and they are in this response anyway: an account error cut the batch short — also setting truncated, on either path, with the ids past that point never requested — or the artifact upload failed and the rows came back inline instead of as a file. An unanswered field_mode='ask' -> {field_mode_required:["full","custom"], credits_consumed:0, message} and nothing billed. Errors -> "Error: ".

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "entity_type": "<entity_type>"
    },
    "name": "entity_fetch"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsNo1..20 specific cosi ids to collect — typically hand-picked from entity_search result rows. Exactly one of 'ids' or 'cache_id'.
limitNocache_id path only: how many matched records to collect, 1..1000 (default 20). Costs 20 credits per record (jobs 1), so limit=1000 bills 20,000 credits for employees or companies. At the current fan-out pacing a full 1000-record collection takes ~200s, which will not finish inside one call — a lower limit returns sooner. Ignored on the 'ids' path.
fieldsNoField names for field_mode='custom' — ADDED to the small id/identity floor (they never replace it). Must be valid names from entity_fields(entity_type, keywords); an unknown field hard-fails before any spend. Each name costs context tokens, not credits. ["*"] (wildcard) is the FULL record (equivalent to field_mode='full'): ~6-7k tokens/record, which usually auto-delivers via 'url'.
cache_idNoA cache_id from entity_search. Resolves the cached query to its matched ids server-side (you never see them) and collects up to 'limit' records, 1000 at the most. Exactly one of 'ids' or 'cache_id'. The resolve is FREE; you pay per record found. There is no continuation: when the query matched more than this call collected, the response says so via 'truncated'. Raise 'limit' to reach the rest; only past 1000 does it take a NARROWER query. Re-using this id returns the same records and bills them again.
deliveryNo'inline' (default) or 'url' (store a JSONL artifact, return a download link — no inline rows). Payloads over ~20k tokens auto-flip to 'url'. Delivery is cost-neutral. A 'url' result names both ways back to the rows and what each one costs: the link returns the whole file in one request, artifact_read returns one page of it at 0 credits. Full-scope fetches typically deliver as 'url' while narrow 'custom' records fit inline.inline
field_modeNoWhich fields to return — a token lever, not a cost lever (every mode bills the same per record). 'ask' (default) confirms the choice before spending: the server elicits full/custom from the user when the client supports it, and otherwise hard-stops with 0 credits and names the explicit field_mode to re-call with. 'full' = every field, with third-party post bodies capped at 200 chars (~6-7k tokens/record). 'custom' = the names in 'fields' (added to a small id/identity floor). Passing 'fields' (names or ["*"]) is itself an explicit choice and skips the 'ask' prompt. Because every scope bills the same per record, re-fetching for one more field pays again: 'full' + delivery='url' holds every field from one paid fetch and stays off the context window, while 'custom' returns a narrower record inline.ask
entity_typeYesEntity type to fetch: 'employee', 'company' or 'job'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • removedInput schema / $defs
      Removed value: -{
      -  "Delivery": {
      -    "enum": [
      -      "inline",
      -      "url"
      -    ],
      -    "title": "Delivery",
      -    "type": "string"
      -  },
      -  "EntityType": {
      -    "enum": [
      -      "employee",
      -      "company",
      -      "job"
      -    ],
      -    "title": "EntityType",
      -    "type": "string"
      -  },
      -  "FieldMode": {
      -    "description": "How entity_fetch chooses which fields to return.\n\nThe choice is a TOKEN lever, never a cost lever — every mode bills the same\nper-record price. ``ASK`` is the default precisely so a fetch never silently\npicks a scope for the user: the server asks first (via MCP elicitation when\nthe client supports it) and otherwise hard-stops without spending.",
      -    "enum": [
      -      "ask",
      -      "full",
      -      "custom"
      -    ],
      -    "title": "FieldMode",
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / delivery / $ref
      Removed value: -"#/$defs/Delivery"
    • addedInput schema / properties / delivery / enum
      Added value: +[
      +  "inline",
      +  "url"
      +]
    • addedInput schema / properties / delivery / title
      Added value: +"Delivery"
    • addedInput schema / properties / delivery / type
      Added value: +"string"
    • removedInput schema / properties / entity_type / $ref
      Removed value: -"#/$defs/EntityType"
    • addedInput schema / properties / entity_type / enum
      Added value: +[
      +  "employee",
      +  "company",
      +  "job"
      +]
    • addedInput schema / properties / entity_type / title
      Added value: +"EntityType"
    • addedInput schema / properties / entity_type / type
      Added value: +"string"
    • removedInput schema / properties / field_mode / $ref
      Removed value: -"#/$defs/FieldMode"
    • addedInput schema / properties / field_mode / enum
      Added value: +[
      +  "ask",
      +  "full",
      +  "custom"
      +]
    • addedInput schema / properties / field_mode / title
      Added value: +"FieldMode"
    • addedInput schema / properties / field_mode / type
      Added value: +"string"
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "entity_fetchOutput",
      -  "type": "object"
      -}New value: +null
  3. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, openWorldHint=true, etc., but the description adds substantial behavioral context: billing per record, ~200s fan-out pacing, credit costs, token costs, delivery auto-flip, warning behavior, error handling, and the field_mode elicitation. This far exceeds the structured annotations and provides a complete behavioral model.

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?

The description is long but extremely dense and well-organized. It front-loads the core purpose and the one-of constraint, then systematically covers limit, field scope, pacing, delivery, and errors. Every sentence carries essential information, and the structure is logical with clear paragraph breaks.

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?

Given the complexity (7 parameters, no output schema), the description covers all necessary details: return formats for inline and url, cache_id behavior with total_count and truncated, warning conditions, error formats, and the field_mode_required response. An agent has everything needed to call it correctly, including billing and time expectations.

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?

Even though schema coverage is 100%, the description enriches each parameter with critical semantics: ids vs cache_id exclusivity, limit cost and time implications, fields adding to the id/identity floor, cache_id re-use billing, delivery auto-flip, and field_mode as a token lever. It explains consequences and trade-offs that the schema alone cannot convey.

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 action: 'Collect full/projected Coresignal records by id', and distinguishes itself from siblings by explicitly referencing entity_search and entity_fields as sources of ids and fields. It also highlights billing per record, which is a unique characteristic.

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?

The description provides explicit usage rules: 'Exactly one of ids or cache_id is accepted', explains the limit semantics, when to raise it, and when a narrower query is needed. It also clarifies the 'ask' mode behavior and that not-found ids are skipped, leaving no ambiguity about when and how to use the tool.

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.