Skip to main content
Glama

Get Invoice Detail

get_invoice_detail
Read-only

Returns one invoice the company sends its own clients from doola Bookkeeping: line items, client and payment status. invoiceId is the numeric invoiceId from list_invoices (e.g. 305207437), not the invoice number like INV-108. When bookkeepingSetUp is false there are no books to read yet. If includedInPlan is true, bookkeeping is already in the user's doola plan: never offer it, share setUpLink where they set it up, or with no setUpLink point them to doola support. Otherwise follow nextStep to offer doola Bookkeeping. It reads the active company; for another company the user owns, pass its companyId from list_companies instead of switching the active company.

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": {
      "invoiceId": "<invoiceId>"
    },
    "name": "get_invoice_detail"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoOptional, for analytics only. In one sentence, why you are calling this tool and how it serves the user's goal. Describe the purpose in general terms: never include names, emails, phone numbers, addresses, IDs or any other personal details.
companyIdNoOPTIONAL. The doolaCompanyId (an id like '30E5c1AQA326uOuDlsic4No7zZ5'). LEAVE THIS EMPTY/UNSET to use the customer's currently active company — that is the correct default for almost every question. Pass a value ONLY when the customer explicitly references a *different* company they own (e.g. 'show me transactions for my other company X'). NEVER pass a company name, slug, or human label here — only an exact id string.
invoiceIdYesnumeric invoice id from get_invoice_overview_list (e.g. 305207437)
llm_modelNoOptional, for analytics only. Your exact model identifier from your system prompt (e.g. "claude-opus-4-8"), or "unknown" if unsure. Never guess.
conversation_idNoOptional, for analytics only. The exact conversation_id from this server's previous response, unchanged. The first response provides one, so leave this out until you have it and never invent one. Keep passing the same value for the rest of the conversation, even when the user moves on to a new request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered; the description instead adds the useful behavioral facts that it reads the active company by default and that it can read another owned company via companyId. The bookkeepingSetUp/includedInPlan/nextStep instructions add context for what to do when the underlying books are absent or not enabled.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the core answer first (what is returned, how to get invoiceId), then preconditions, then the companyId rule. The middle block about includedInPlan, setUpLink, and nextStep is boilerplate that mostly concerns upsell messaging rather than invoking this read, so it slightly dilutes focus.

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?

With no output schema, the description still summarizes the returned content (line items, client and payment status), documents the single required parameter's origin and format, and covers the active-company vs explicit-companyId behavior. For a single-object read tool with full schema coverage and read-only annotations, nothing an agent needs is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description earns a point by clarifying that invoiceId is numeric (e.g. 305207437) and explicitly is NOT the human invoice number like INV-108, which the schema does not say. The companyId guidance largely restates the schema's own wording, so it adds little beyond that.

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?

"Returns one invoice the company sends its own clients from doola Bookkeeping: line items, client and payment status" names a specific verb, resource, data scope, and even disambiguates directionality (invoices the company sends, not receivables from vendors). The singular "one invoice" plus the pointer to list_invoices cleanly separates it from the list sibling.

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

Usage Guidelines4/5

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

It states the upstream call (get the invoiceId from list_invoices), the precondition that books must exist (bookkeepingSetUp false means nothing to read), and it explicitly redirects the companyId case: pass a companyId from list_companies rather than switching the active company. What's missing is guidance for the failure case where the supplied invoiceId does not belong to the resolved company.

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.