Skip to main content
POST
Call a tool

Authentication

Pass an Outlit API key in the Authorization header as Bearer ok_....

Request body

tool is a public tool name. The table below lists the main tools; Integration tools also documents two compatibility handoff tools. input is the tool-specific object, validated against the shared @outlit/tools contract before the tool runs.

Supported tools

Customers and people

Identity

Inbox

Access

Timeline and sources

Analytics

Features

Toolsets

Tools belong to a toolset: core (customers, people, facts, sources, search, SQL), work (your tasks, the Inbox, and acting on them, with undo), identity (merges), admin (access, destinations, integrations, settings, Features) and meta (feedback and these three tools).

Configuration

Feedback

outlit_submit_feedback accepts body (required, trimmed, non-empty, at most 20,000 characters), optional area (trimmed, non-empty, at most 100 characters), and optional context (a JSON object of at most 16 KiB serialized, for diagnostics such as the surface or client version — never secrets or unnecessary customer data). It returns the recorded feedback id and createdAt timestamp. Submissions require authentication and are rate limited under a dedicated quota; they do not consume paid plan API-call quota. Feedback is product intake, not a support ticket, and does not guarantee a reply. For schema-driven clients, @outlit/tools publishes tool input schemas as publicToolContracts.

TypeScript client

Use @outlit/tools when you want the same tool names and input contracts that power the CLI, Pi package, and public tool gateway:
The package also exports publicToolContracts, publicToolNames, server-defined consumerToolPolicies, defaultToolNames, analyticalToolNames, piToolNames, cliToolNames, allPublicToolNames, publicOpenApiTransports, toolGatewayTransport, apiKeyValidationTransport, toolGatewayErrorCodes, toolGatewayErrorSchema, ingestTransport, and enum lists such as sourceTypes. The context tools take and return lowercase values (email, calendar_event, churn_risk). opportunity is the source type for CRM opportunities; CRM and CRM_OPPORTUNITY are older input spellings. invoice is the Stripe invoice source type; outlit_get_source and outlit_list_sources also accept STRIPE_INVOICE as an older spelling, but search and outlit_list_facts do not.

Reading a list

A list tool returns its rows under a key named for what they are, not always items, beside page and, when the gateway cut the list to fit the size cap, truncation. @outlit/tools reads them one way: collectionOf(toolName, output) returns { key, items, page?, truncation? }, or undefined for a tool that returns no list. items is empty when the output holds no rows, so check truncation and page.hasMore before reading it as “nothing there”. isCollectionTool(name) and the collectionKeys table are exported too, and a test checks the table against the generated output schemas.

Examples

List paying customers

Get customer details

Read a Stripe invoice

Use invoice (outlit_get_source and outlit_list_sources also accept STRIPE_INVOICE as an older spelling) with the Stripe invoice ID. The record lists every stored line item: amounts, quantity, price, product, service period, whether it recurs or is one-off, and proration. Every amount is a Money value ({ amount, currency, decimals, formatted }).

Read a customer’s renewal date

Returns "renewal": { "status": "available", "asOf": "...", "data": { "date": "2026-03-01", "source": "billing" } }, the date the customer page shows. source is outlit (set in Outlit), crm (a CRM opportunity), or billing (the billing period of a yearly subscription). The section has status empty when the customer has none.

Read a customer’s CRM account fields

Returns crm.data: one entry per CRM or support tool account linked to the customer, with provider, connectionId, accountId, name, the owner as that system records it, recordUpdatedAt, and fields: every non-empty field as stored, each with its key, label, value and whether it is custom. contacts lists the people that system associates with the account, whatever their email domain, most recently modified first: up to 25, each with contactId, name, email, title and userId, the customer’s user with that contact or email (null when the person is not one of its users). More are counted in omittedContactCount, and contactsNext is the call that reads the next 25: crmContacts: { connectionId, accountId, cursor? }. Fields past the response’s size limit are counted in omittedFieldCount and named in omittedFields while they fit; ask for them with fields (selectors { "key": "hs_lead_status" }, optionally with a source; selectors that match nothing come back in unmatchedFields). The section is enabled per workspace, and is absent until it is.

Filter and list customers by customer fields

filters.fields filters by customer fields: up to 10 filters, all of which must hold. A field’s source is hubspot, salesforce, attio, pylon (the fields of the customers’ CRM and support tool accounts, any linked account counting) or traits (traits sent with the Outlit SDK). eq and in compare text ignoring case; gte and lte compare numbers or ISO dates. fields (up to 5) adds fields to each customer: each field with its label and its values. Find a field’s source and key, its picklist options and the values customers hold with outlit_list_customer_fields. Filters matching more than 5,000 customers are refused; add a narrower one. outlit_list_customers filters are grouped under filters: billingStatus (an array of lowercase statuses), arr (above, below, currency; minor units), fields, owner (id, email, has), activity (within, notWithin, activatedSince), renewal (within one of next_30d to next_365d, or after and before as YYYY-MM-DD UTC dates; customers with no stored renewal date never match) and search. orderBy renewal_date sorts by the stored renewal date (ascending by default, customers with none last), and each customer carries renewal: { date, source } | null. The earlier top-level spellings (billingStatus, arrAbove, arrBelow, arrCurrency, mrrAbove, mrrBelow, traitFilters, crm, crmFields, search, ownerId, ownerEmail, hasOwner, hasActivityInLast, noActivityInLast, activatedSince), uppercase billing statuses and the orderBy values arr_cents, mrr_cents and first_seen_at are mapped to the new ones until 2026-12-11, and refused with the new name after that. outlit_list_crm_fields is now outlit_list_customer_fields, with provider renamed source.

Read a contact’s or deal’s CRM fields

outlit_list_people with "include": ["crm"] (or outlit_get_customer with "include": ["users", "crm"]) adds crm to each user: the CRM contacts linked to them, with fields in the same shape as account fields. outlit_get_source on an opportunity adds the deal’s fields. The same size limit applies: fields left out are counted in omittedFieldCount, and contacts left out are counted in omittedCrmContacts. A user has no crm when the section is not enabled for the workspace or when the size limit left no room for them; ask for fewer users or fields to get it.

Search customer context

Omit customer to search across all customers. The top-level customer is the customer you scoped to, or null for a search across customers. Each source and fact result also carries a customer (id, name, domain) naming the customer it belongs to. A result’s customer is null when it can’t be attributed to exactly one customer you can read. When nothing matches, results is empty and coverage.searched says what was searched. customer takes an ID, a domain or a name, the same on every context tool. The earlier top-level topK, sourceTypes, after and before (and sourceType on outlit_list_sources, startDate/endDate/timeframe/channels/eventTypes on outlit_get_timeline, status/factTypes/factCategories on outlit_list_facts, and sourceType/sourceId on outlit_get_source), uppercase values, and the source aliases CRM, CRM_OPPORTUNITY and STRIPE_INVOICE are mapped to the new ones until 2026-12-11, and refused with the new name after that.
Example response with two source results:

List active contact transition facts

Read a fact’s reasoning, quote and evidence

A fact from outlit_list_facts or outlit_search_customer_context is concise: it has no reasoning or source.quote unless the call asks with "include": ["reasoning", "quote", "evidence"]. With evidence a fact carries its first three cited excerpts as evidence: { items, page, more }. outlit_get_fact { "id": "fact_123" } returns the whole fact; "part": { "field": "reasoning" } (assertion, reasoning, quote or evidence) reads one long field a page at a time, and part.cursor continues it with the previous page’s nextCursor.

Open one source record

Read exact source content

Exact lookup can include content, a section with bounded content segments. Only content.status: "available" has data. The default page size is 10 segments, with a maximum of 100. Pass the returned content.data.page.nextCursor with the same source when content.data.page.hasMore is true; until then the content is partial. content.data.omittedFields names record fields left out.
Example response with complete content:

Follow person profile evidence

When a fact or search result references a person_profile source, pass its source for exact lookup. Replace the example ID with the ID from that reference.

Read customer features

include also takes relationship (a summary and at most eight current statements), meters (Autumn metered quantities that are not credits) and credits (Autumn credit pools). features, meters and credits come in pages of 25 by default, at most 100: pass features, meters or credits with limit and cursor to page one of them. Feature usage is factual historical evidence. A feature can report complete or partial counts, no matches in the requested window, or unavailable source evidence. Unavailable evidence is not converted to zero. Archive is the available self-service lifecycle action. Creating a Feature also creates the supporting weekly event-count and active-days metrics inside Outlit; those metrics are not separate public resources.

Admin tools

The admin tools change a workspace, so they share a few rules.
  • Retries. Writes that can be sent twice take an idempotencyKey, any unique string (outlit_create_destination, outlit_archive_destination, outlit_set_customer_owner, outlit_set_customer_access, outlit_setup_integration, outlit_create_feature, outlit_archive_feature). A retry with the same idempotencyKey and input returns the first result; a changed input with the same key is refused.
  • Previews. outlit_archive_destination, outlit_archive_feature and outlit_set_customer_owner change nothing on the first call. They return preview.token, what the change would affect, and next, the exact call to confirm. Confirm with the same target, "mode": "execute" and "previewToken". A token lasts 15 minutes; a token that no longer matches the current state is refused with preview_stale and a fresh preview.
  • Undo. outlit_set_customer_owner and outlit_set_customer_access return undo: { token, until } (24 hours), or null when the change cannot be undone. Call the same tool with { "undoToken", "idempotencyKey" } to put the earlier state back. When the caller could not undo a change, such as removing their own access, the first call returns outcome: "needs_confirmation" with the reason, a preview and next.
  • Set state. outlit_update_destination and outlit_update_settings take the end state; only the fields you send are written. revision is optional: when it is stale the call is refused with stale_revision, unless every field you asked for already holds its value.
  • Shapes. Lists return their rows (items; other tools use another key) and page { hasMore, nextCursor, total } (25 per page by default, at most 100), and coverage when empty. People are { id, name, email }; customers { id, name, domain }. Enums are lowercase. A missing permission is TOOL_CALL_FORBIDDEN with missingPermission.

Moving from the earlier admin tools

Each earlier name and input spelling keeps working until 2026-12-11.

Submit product feedback

Returns { "id": "10000000-0000-4000-8000-000000000004", "createdAt": "2026-09-28T12:00:00.000Z" }. See Feedback for input limits. Feedback is product intake, not a support ticket.

Response

The response is the selected tool’s JSON result. List tools return paginated collections; exact lookup tools return the matched record or an error when the record cannot be found. Search returns grouped artifact-level source and fact results, not raw vector chunks. Every source is a source of { type, id } that outlit_get_source opens as it is; a fact’s source also carries occurredAt, quote and permalink when available. Money is always { "amount", "currency", "decimals", "formatted" }: amount is an integer in the billing provider’s minor units for the currency, decimals is how many digits follow the decimal point (so amount / 10^decimals is the major-unit value), and formatted is ready to display (for example 1234500 is “$12,345.00" in USD). Other currencies follow the provider's amount rules (see [Stripe's currency docs](https://docs.stripe.com/currencies)). Customer `arr` is the annualized revenue run rate, the same figure the Outlit app shows: `arr.value` is the money, and `estimated` is `true` when the amount includes a usage or per-seat estimate. `arr.value.amount` is `0` for a churned, paused, or trialing customer, and `arr` is `null` when the app shows none. `outlit_get_customer` returns `revenue.data.arr` with the customer's `lifecycle` and the `parts` it is counted from. The example below is for a customer billed in USD, so `"amount": 300000` is $3,000.00 ARR. The legacy monthly currentMrr and mrrCalculationStatus fields are removed from customer results. Customer lists and reads use lowercase billing statuses (none, trialing, paying, past_due, churned), page for pagination, and outlit.firstSyncedAt for when Outlit first synced the customer (formerly firstSeenAt). Each section outlit_get_customer includes is { "status": "available", "asOf", "data" }, or a status of empty, not_connected, not_synced or unavailable with a reason. Example list response:

Call allowance and limits

  • Plan allowance. Every tool call spends one API call from the workspace’s plan allowance, and a repeated write that replays a stored result still counts. A call the gateway ends without a result, such as a resource that is not found, is given back. When the allowance is spent the call is refused (429 plan_api_limit_exceeded on the free plan, 402 plan_billing_action_required on a paid plan) with resetsAt, the time it renews. The refusal is not retryable before then. outlit_submit_feedback has its own quota and spends none of the allowance.
  • Response size. A result is at most 64 KiB. A list returns the rows that fit, with truncation saying how many it kept and next the call for the rest; any other tool returns 413 TOOL_RESULT_TOO_LARGE with a next saying how to ask for less.
  • Paging. Lists return 25 rows by default and at most 100 per page, except outlit_get_source, whose content comes in segments of 10 by default, and outlit_query (default 100 rows, at most 1,000 per page).
  • SQL. outlit_query runs at most 3 queries at once per workspace; a fourth waits up to 10 seconds for a slot, then fails and can be retried. A query is stopped after about 30 seconds.
  • Idempotency. A write’s result is kept for 24 hours under its idempotency key. A retry with the same key and input in that time returns the first result; the same key with different input is refused with IDEMPOTENCY_CONFLICT.

Error responses

Invalid JSON, unknown tool names, or invalid tool inputs return 400:
Invalid credentials return 401. A workspace that has spent its plan allowance gets 429 with the code plan_api_limit_exceeded (free plan) or 402 with plan_billing_action_required (paid plan); see Call allowance and limits. Both are retryable: false and carry resetsAt, an ISO 8601 time, and the earlier resetAt (milliseconds since the epoch; prefer resetsAt). Codes: INVALID_JSON, INVALID_TOOL_CALL, INVALID_TOOL_INPUT (400), INVALID_CREDENTIALS (401), TOOL_CALL_FORBIDDEN (403), TOOL_RESOURCE_NOT_FOUND (404), CONFLICT (409, a write that conflicts with the current state, such as a stale revision), IDEMPOTENCY_CONFLICT (409), TOOL_RESULT_TOO_LARGE (413), RATE_LIMITED (429, a tool’s own rate limit: wait retryAfterSeconds), INTERNAL_ERROR (500) and TOOL_GATEWAY_ERROR (503, retryable). TOOL_IMPLEMENTATION_ERROR is what earlier releases sent for a conflict, a rate limit or a crash; it remains the code for other tool failures (an unreadable page, an outage), and clients should keep accepting it. Readers should ignore a code they do not know. A validation issue in validationIssues carries path, code and a message saying what to fix, written from the schema’s own bounds and never from the received value; an enum or literal mismatch also lists validValues. A 429 carries retryAfterSeconds (and a Retry-After header): the whole seconds to wait. A key whose every grant is a read grant is refused for a write with TOOL_CALL_FORBIDDEN, “This key can only read” and the missingPermission the tool needs; previews of a write and outlit_submit_feedback still run. Reading destinations, behavior metrics and integrations takes the grants destinations:read, behavior_metrics:read and integrations:read. An idempotency key that was already used with different input returns 409 with the code IDEMPOTENCY_CONFLICT; send a new idempotency key, or repeat the original input. A result larger than 64 KiB is never returned whole: a list returns the items that fit with a truncation field whose next names the call for the rest, and anything else returns 413 with the code TOOL_RESULT_TOO_LARGE and a next saying how to ask for less.

Response headers

Beside the result, the gateway can send these headers. @outlit/tools reports them through the client’s onResponse option, the CLI prints deprecations and notices to stderr, and Pi adds them as a second text block after the result. A request may send Outlit-Version: <date> to say which output version it expects. Only the current version is accepted; any other value is refused before the call runs with INVALID_TOOL_INPUT, naming the value sent and the accepted one. Leave the header out to take the current version. MCP results carry the same values in _meta: "outlit/requestId" and "outlit/version", and an error result carries its envelope in _meta["outlit/error"] with no structuredContent. @outlit/tools returns them as meta.requestId and meta.version from client.callToolWithMeta(), as error.requestId and error.version on OutlitToolsApiError, and in onResponse. createOutlitClient({ version }) sends Outlit-Version. The CLI prints them to stderr with --verbose (a JSON line in JSON mode), and Pi puts them in the result’s details. Every call from @outlit/tools, @outlit/cli and @outlit/pi sends x-outlit-client: <package>/<version>, for example @outlit/cli/5.0.0. The gateway uses it to add a deprecation notice to the response of a client below the minimum version for a release; see Compatibility. Send it from your own client too, naming your own package and version. Retired tool names answer until the date in their outlit-deprecation header, then return INVALID_TOOL_INPUT with the issue code renamed_tool and the new name in next.tool.

Authorizations

Authorization
string
header
required

Outlit API key (ok_...).

Body

application/json
tool
string
required
Allowed value: "outlit_list_customers"
input
object

Response

Capability output

items
object[]
required
page
object
required
totals
object
required
arrCurrencies
string[]

When the call ordered or bounded by ARR: the currencies among the matches. With more than one, amounts were compared unconverted; pass filters.arr.currency to rank within one.

coverage
object

When items is empty, or when filters.credits or orderBy meter_usage left customers out.

truncation
object

Set by the gateway when the list was cut to fit the response cap; next says how to get the rest.