Skip to main content
Glama

Codat MCP by usefulapi

List direct costs

codat_list_direct_costs
Read-only

List a company's direct costs (point-of-sale purchases: card/cash spend, refunds) for a data connection. NOTE: this endpoint is CONNECTION-scoped. Codat API: GET /companies/{companyId}/connections/{connectionId}/data/directCosts. Returns the paged envelope.

Input Schema

NameRequiredDescriptionDefault
pageNoPage number (default 1).
queryNoCodat query filter string, e.g. "status=Paid" or "modifiedDate>2026-01-01". See docs.codat.io/using-the-api/querying.
orderByNoField to order results by, e.g. "-modifiedDate" (leading "-" for descending).
pageSizeNoRecords per page (1-2000, default 100).
companyIdYesThe Codat companyId (UUID).
connectionIdYesThe Codat connectionId (data connection UUID) within the company.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds real value on top: it names the exact upstream endpoint (GET /companies/{companyId}/connections/{connectionId}/data/directCosts), flags the connection-scoping constraint, and discloses that the response is a paged envelope. It stops short of describing pagination mechanics or failure modes for un-synced connections.

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?

Three sentences, front-loaded with what the entity is, then the scoping caveat, then the endpoint and return shape. No filler; every clause carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only list endpoint with full schema descriptions, this covers purpose, scope, endpoint identity, and paginated return shape. The remaining gap is that no output schema exists, so the actual envelope fields (e.g. results, nextPage) are only hinted at by the phrase 'paged envelope'.

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 coverage is 100%, with page, query, orderBy, pageSize, companyId and connectionId all documented inline in the schema, so the baseline is 3. The description reinforces the scoping of companyId/connectionId but adds no filter syntax, ordering semantics, or default behavior beyond what the schema already provides.

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?

States a specific verb (List) and resource (direct costs) and immediately disambiguates the domain with a parenthetical definition: point-of-sale card/cash spend and refunds. That definition cleanly separates it from sibling endpoints like codat_list_payments, codat_list_bills, and codat_list_account_transactions without needing their schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The CONNECTION-scoped note gives useful routing context (this requires a companyId + connectionId pair, unlike company-wide endpoints), but it never states when to prefer this tool over alternatives or what prerequisites must hold (e.g. data must have been synced for the connection). Usage is implied rather than stated.

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.