Retrieval & Cost

The MCP tools return less than an equivalent REST call by default, because every byte a tool returns is re-sent to the model on every later turn. This shapes how to call search_records, query_records and get_record, and where the bill comes from.

To connect a client first, see Connect Claude or Connect ChatGPT and OpenAI.


Search returns shortened text by default

search_records and query_records can cap the length of text fields, and mark each field they shortened, so an agent can tell a fragment from the whole value. The cap is set per collection connection, applies only where the connection also allows get_one, and can be switched off. See MCP Server → Truncated text for the default, the markers, and how it interacts with populate.

Search and fetch are a pair

search_records and query_records exist to give you enough of each hit to decide whether it's the one you want. get_record is the other half of the pair — it returns the document in full, untruncated, every time.

Concretely: a record with an 11,917-character body comes back from search_records as 1,000 characters, carrying original_length: 11917 in its truncation marker. get_record on the same record returns all 11,917. Search to find, get_record to read.


Page size defaults to 5

search_records and query_records return 5 records per call when limit is omitted (limits). Which size to use depends on the task:

  • Finding a document. Five hits is plenty — read the snippets, pick the one that matches, call get_record for the whole thing.
  • Enumerating or counting. Raise limit to the maximum instead of paging through at the default. Paging at 5 is the expensive way to count something, because the whole conversation — every earlier page you already retrieved — is re-sent to the model on every subsequent turn. Counting 200 records five at a time is 40 round trips of resent context; the same count at limit=100 is 2.

Pagination

Pass a list response's page.next_cursor back as the cursor argument to get the next page. A cursor does not expire, so it can be stored and reused. See MCP Server → Page size for the page object.


Cost is dominated by re-reads, not model choice

A hosted connector re-sends the entire conversation on every server-side iteration of its tool loop. That means the bill scales with how many tool calls an agent makes, not with how much data any single call returns — a search_records call that returns 5 truncated snippets and one that returns 100 full records cost the same to have made, but the second one costs far more on every subsequent turn because there's more to resend.

The effect is steep rather than gradual. The same question against the same collections can differ by more than an order of magnitude in input tokens depending on how many round trips the agent takes to answer it — twenty tool calls against fourteen is not a 40% difference in cost, because each additional call re-sends everything before it.

Fewer, narrower searches followed by get_record on the chosen document is the cheap pattern. Casting wide, re-searching to narrow down, and paging through results is the expensive one, regardless of which model or connector is doing it.


Paused turns

Claude's MCP connector runs its tool loop with an iteration limit, 10 by default. On reaching it mid-task the response returns stop_reason: "pause_turn" rather than end_turn, carrying the work completed so far.

This is not an error and not a final answer. Continue the task by sending the response back as an assistant message in the next request, with the same tools attached, exactly as the stop reason documentation describes. A client that only checks for end_turn and treats anything else as "done" will see a truncated or empty-looking answer with no error raised — the request succeeded, it just didn't finish.

Was this page helpful?