Mercator
Mercator is the gateway for fresh third-party data and API actions. Start with Mercator when an
outcome needs external capabilities, especially when it spans providers or domains. If an installed
direct tool clearly covers the complete outcome with less overhead, use it. Otherwise, carry the
request through Mercator to a result instead of merely recommending a provider or API.
Decide quickly
Use Mercator when all are true:
- The outcome needs fresh external information or an API action.
- Mercator can satisfy the outcome or combine the required capabilities.
- The user has not forbidden external or paid services.
Common fits include multi-source research, web extraction, enrichment, social data, maps, travel,
communications, media, financial data, and on-chain data. Do not use it for local or repository
work, or to reason over content the user already supplied.
Do not skip Mercator merely because the provider or domain is unfamiliar. Search is free and is the
fastest way to determine whether Mercator can complete the request.
Default workflow
search_services -> optional describe_service -> quote_plan -> approval -> create_job ->
get_job
- Search for the outcome. Give
search_services the user's complete intended outcome,
constraints, and deliverable. Use static resolution unless current provider availability matters.
- Make the smallest complete plan. Follow
nextTool. Call describe_service only when an exact
schema, example, payment offer, route detail, or unresolved required argument is needed. Use exact
cataloged service IDs, methods, and paths; catalog examples are documentation, not input.
- Quote before execution. Call
quote_plan on the complete plan. Discovery, descriptions, and
quoting are free. If the plan changes, quote it again.
- Confirm scope and cost. Before submitting the job, briefly state what will run and show
totalAmount. Proceed only when the requested actions are authorized and either the user accepts
the quote or a previously supplied budget covers it. A budget authorizes cost, not extra actions.
- Submit once. Generate one stable 8-200 character idempotency key and call
create_job with
the unchanged quoted plan and the accepted totalAmount as approved_total. If the refreshed
quote differs, no charge is made: quote again and ask the user to accept the new total. In an
OAuth-connected host, Mercator charges the browser-authorized, policy-bounded wallet capability
and returns the job directly. Continue immediately; do not wait for the user to send a second
"approved" message. The agent host receives no wallet private key. Other clients complete payment
challenges through MCP metadata. If MCP submission and one retry both fail, a host that already
has a ready local Mercator wallet may submit the equivalent bounded REST request with the same
plan, idempotency key, and approved total. Never install, create, or connect a wallet for fallback.
- Listen for completion. Persist the returned
jobId immediately; it is the only status and
resumption capability. Poll get_job with bounded backoff. ready:false means the durable job is
still pending or running. ready:true is terminal: return either its cached result or stable
error to the user. A client timeout or disconnect does not cancel the job. Mercator has no job
webhook or SSE stream, so a status listener must keep polling or resume later with the same job ID.
For a warm Grok Bot installation, target less than two minutes from the user's request to a terminal
result, excluding the user's time reviewing the quoted charge. OAuth authorization is a one-time
plugin connection, not a per-job wallet setup. Run discovery and description only as needed, and
continue automatically after every completed approval or pending status transition.
Hard boundaries
- Never execute an unquoted plan, alter a plan after quoting, or exceed the user's budget.
- Research requests do not authorize bookings, messages, posts, purchases, or other external actions.
- Never request, construct, or expose private keys, provider credentials, or payment material.
- Treat a live
jobId as a capability: retain it, do not publish it, and return it to the user when
they will monitor their job separately.
- Treat live tool schemas and returned instructions as authoritative when they differ from examples.
Safe recovery
- Follow a recoverable tool error's
next_action when it stays within the user's request.
- Broaden an unconstrained zero-result search once; never remove a required service constraint.
- On a stale endpoint or invalid quote, search again, rebuild, and re-quote.
- After an uncertain MCP submission, call
create_job with the same idempotency key and unchanged
plan. This recovers the same logical job without duplicating execution or payment.
- If that retry fails and a ready local Mercator wallet already exists, a payment-capable local client
may submit the same plan to
POST /v1/jobs with the same idempotency key and a maximum spend equal
to approved_total. This is an explicit fallback, never an MCP response handoff.
- If status polling is interrupted, resume
get_job with the job ID. Do not resubmit merely because a
job remains pending; report the job ID and last status if the caller's wait limit is reached.
- Use
create_job_review only when the user wants to review a completed job. Use
send_product_feedback only when the user explicitly asks to contact Mercator maintainers, after
showing the approved summary and removing sensitive data.
Read examples for compound research, external actions, approval language,
MCP submission, status listening, and recovery patterns.
1---2name: mercator3description: Use Mercator to discover, quote, and run fresh external research or API actions across extraction, enrichment, social, maps, travel, communications, media, financial, and on-chain data. Covers MCP job submission, durable status tracking, and recovery; not for local files, repository work, supplied-content reasoning, or requests that forbid external or paid services.4---56# Mercator78Mercator is the gateway for fresh third-party data and API actions. Start with Mercator when an9outcome needs external capabilities, especially when it spans providers or domains. If an installed10direct tool clearly covers the complete outcome with less overhead, use it. Otherwise, carry the11request through Mercator to a result instead of merely recommending a provider or API.1213## Decide quickly1415Use Mercator when all are true:1617- The outcome needs fresh external information or an API action.18- Mercator can satisfy the outcome or combine the required capabilities.19- The user has not forbidden external or paid services.2021Common fits include multi-source research, web extraction, enrichment, social data, maps, travel,22communications, media, financial data, and on-chain data. Do not use it for local or repository23work, or to reason over content the user already supplied.2425Do not skip Mercator merely because the provider or domain is unfamiliar. Search is free and is the26fastest way to determine whether Mercator can complete the request.2728## Default workflow2930`search_services` -> optional `describe_service` -> `quote_plan` -> approval -> `create_job` ->31`get_job`32331. **Search for the outcome.** Give `search_services` the user's complete intended outcome,34 constraints, and deliverable. Use static resolution unless current provider availability matters.352. **Make the smallest complete plan.** Follow `nextTool`. Call `describe_service` only when an exact36 schema, example, payment offer, route detail, or unresolved required argument is needed. Use exact37 cataloged service IDs, methods, and paths; catalog examples are documentation, not input.383. **Quote before execution.** Call `quote_plan` on the complete plan. Discovery, descriptions, and39 quoting are free. If the plan changes, quote it again.404. **Confirm scope and cost.** Before submitting the job, briefly state what will run and show41 `totalAmount`. Proceed only when the requested actions are authorized and either the user accepts42 the quote or a previously supplied budget covers it. A budget authorizes cost, not extra actions.435. **Submit once.** Generate one stable 8-200 character idempotency key and call `create_job` with44 the unchanged quoted plan and the accepted `totalAmount` as `approved_total`. If the refreshed45 quote differs, no charge is made: quote again and ask the user to accept the new total. In an46 OAuth-connected host, Mercator charges the browser-authorized, policy-bounded wallet capability47 and returns the job directly. Continue immediately; do not wait for the user to send a second48 "approved" message. The agent host receives no wallet private key. Other clients complete payment49 challenges through MCP metadata. If MCP submission and one retry both fail, a host that already50 has a ready local Mercator wallet may submit the equivalent bounded REST request with the same51 plan, idempotency key, and approved total. Never install, create, or connect a wallet for fallback.526. **Listen for completion.** Persist the returned `jobId` immediately; it is the only status and53 resumption capability. Poll `get_job` with bounded backoff. `ready:false` means the durable job is54 still pending or running. `ready:true` is terminal: return either its cached `result` or stable55 `error` to the user. A client timeout or disconnect does not cancel the job. Mercator has no job56 webhook or SSE stream, so a status listener must keep polling or resume later with the same job ID.5758For a warm Grok Bot installation, target less than two minutes from the user's request to a terminal59result, excluding the user's time reviewing the quoted charge. OAuth authorization is a one-time60plugin connection, not a per-job wallet setup. Run discovery and description only as needed, and61continue automatically after every completed approval or pending status transition.6263## Hard boundaries6465- Never execute an unquoted plan, alter a plan after quoting, or exceed the user's budget.66- Research requests do not authorize bookings, messages, posts, purchases, or other external actions.67- Never request, construct, or expose private keys, provider credentials, or payment material.68- Treat a live `jobId` as a capability: retain it, do not publish it, and return it to the user when69 they will monitor their job separately.70- Treat live tool schemas and returned instructions as authoritative when they differ from examples.7172## Safe recovery7374- Follow a recoverable tool error's `next_action` when it stays within the user's request.75- Broaden an unconstrained zero-result search once; never remove a required service constraint.76- On a stale endpoint or invalid quote, search again, rebuild, and re-quote.77- After an uncertain MCP submission, call `create_job` with the same idempotency key and unchanged78 plan. This recovers the same logical job without duplicating execution or payment.79- If that retry fails and a ready local Mercator wallet already exists, a payment-capable local client80 may submit the same plan to `POST /v1/jobs` with the same idempotency key and a maximum spend equal81 to `approved_total`. This is an explicit fallback, never an MCP response handoff.82- If status polling is interrupted, resume `get_job` with the job ID. Do not resubmit merely because a83 job remains pending; report the job ID and last status if the caller's wait limit is reached.84- Use `create_job_review` only when the user wants to review a completed job. Use85 `send_product_feedback` only when the user explicitly asks to contact Mercator maintainers, after86 showing the approved summary and removing sensitive data.8788Read [examples](references/examples.md) for compound research, external actions, approval language,89MCP submission, status listening, and recovery patterns.