Sign in

MCP tools

View as Markdown

Every tool of the MCP server, written from its own definitions. Connect an assistant sets the server up. An assistant reads each tool's full description in tools/list.

documents:read

get_document

Reads one document as ocost.document.v1, like GET /public/v1/documents/{document_id}.

ArgumentTypeMeaning
document_iduuid, requiredAn id Ocost gave (a UUID)
JSON
{
  "name": "get_document",
  "arguments": {
    "document_id": "01a1b08c-7aa1-7b52-9d4e-2f1f1c0c4f11"
  }
}

get_file

Answers a file's status, reason and documents, like GET /public/v1/files/{file_id}.

ArgumentTypeMeaning
file_iduuid, requiredAn id Ocost gave (a UUID)
JSON
{
  "name": "get_file",
  "arguments": {
    "file_id": "01a1b08c-6e3a-7562-8f4a-7924722667b1"
  }
}

list_files

Lists files by their last change, oldest first, like GET /public/v1/files.

ArgumentTypeMeaning
statuslist of received, reading, read, not_read, failedOnly files in these statuses
updated_sincedate-timeFiles changed at or after this time (ISO 8601)
cursorstringnext_cursor of the page before
limitinteger 1–100, default 50Files per page.
JSON
{
  "name": "list_files",
  "arguments": {
    "status": ["read", "not_read", "failed"],
    "updated_since": "2026-11-09T08:00:00Z"
  }
}

read_document

Reads a document's pages as text, up to 4 pages and 12,000 characters.

ArgumentTypeMeaning
document_iduuid, requiredA document's id.
pageslist of integerThe file's page numbers to read.
JSON
{
  "name": "read_document",
  "arguments": {
    "document_id": "01a1b08c-7aa1-7b52-9d4e-2f1f1c0c4f11",
    "pages": [1, 2]
  }
}

find_documents

Lists documents newest first, by kind, family or company.

ArgumentTypeMeaning
kindacceptance_protocol, agreement, bonus_payment_notification, … (81 values)One document type, as kind_detail in Values lists them.
company_iduuidA company's id, from find_company.
familyinvoices, payments, buying, contracts, reports, people, otherA group of kinds, such as invoices or contracts.
JSON
{
  "name": "find_documents",
  "arguments": {
    "kind": "credit_note",
    "company_id": "01a1b08c-5c2d-7e10-8b3a-1d2e3f4a5b6c"
  }
}

find_contracts

Lists contracts with their term, notice and recurring amounts.

ArgumentTypeMeaning
company_iduuidA company's id, from find_company.
JSON
{
  "name": "find_contracts",
  "arguments": {
    "company_id": "01a1b08c-5c2d-7e10-8b3a-1d2e3f4a5b6c"
  }
}

find_company

Finds suppliers and customers by name, with their ids.

ArgumentTypeMeaning
namestring, default ""Part of the name. Without it, all are listed.
JSON
{
  "name": "find_company",
  "arguments": {
    "name": "Musterbüro"
  }
}

find_project

Finds projects by name, with their ids.

ArgumentTypeMeaning
namestring, default ""Part of the name. Without it, all are listed.
JSON
{
  "name": "find_project",
  "arguments": {
    "name": "Neubau"
  }
}

company_documents

Lists a company's documents in both directions, up to 30.

ArgumentTypeMeaning
company_iduuid, requiredA company's id, from find_company.
JSON
{
  "name": "company_documents",
  "arguments": {
    "company_id": "01a1b08c-5c2d-7e10-8b3a-1d2e3f4a5b6c"
  }
}

invoice_detail

Shows one invoice as its page in Ocost does: amounts, due date, discount, order and trail.

ArgumentTypeMeaning
invoice_iduuid, requiredAn invoice's id.
JSON
{
  "name": "invoice_detail",
  "arguments": {
    "invoice_id": "01a1b08c-8c3d-7f41-a2b5-3e4f5a6b7c8d"
  }
}

open_decisions

Lists the connected person's open decisions, due first.

Only through an OAuth connection, as the person who allowed it.

ArgumentTypeMeaning
company_iduuidA company's id, from find_company.
project_iduuidA project's id, from find_project.
JSON
{
  "name": "open_decisions",
  "arguments": {
    "company_id": "01a1b08c-5c2d-7e10-8b3a-1d2e3f4a5b6c"
  }
}

check_invoice

Checks supplier invoices against § 14 UStG, and whether each is an e-invoice.

ArgumentTypeMeaning
document_idslist of uuidThe invoices to check, by their ids.
company_iduuidA company's id, from find_company.
issued_sincedateThe issue date, from.
issued_untildateThe issue date, up to.
only_missingboolean, default falseOnly invoices that lack something.
titlestringThe table's title.
JSON
{
  "name": "check_invoice",
  "arguments": {
    "company_id": "01a1b08c-5c2d-7e10-8b3a-1d2e3f4a5b6c",
    "issued_since": "2026-01-01",
    "only_missing": true
  }
}

documents:write

send_file

Sends a file as base64, like POST /public/v1/files.

ArgumentTypeMeaning
filenamestring, requiredIts name, e.g. bill.pdf
content_base64string, requiredThe file's bytes in base64: a PDF, an image (JPEG, PNG, TIFF, WebP) or an e-invoice's XML (XRechnung, UBL, CII), at most 25 MB
external_refstringYour own id for it, e.g. an Odoo bill's 'account.move,42'; kept and given back
JSON
{
  "name": "send_file",
  "arguments": {
    "filename": "invoice.pdf",
    "content_base64": "JVBERi0xLjcK…",
    "external_ref": "account.move,42"
  }
}

search:read

search_documents

Searches what documents say, by exact text, keywords, meaning or both.

ArgumentTypeMeaning
querystring, requiredWhat to find.
matchexact, keywords, meaning, hybrid, default "hybrid"exact as written, keywords by words, meaning by meaning, hybrid both.
document_iduuidSearch this document only.
kindslist of acceptance_protocol, agreement, bonus_payment_notification, … (81 values)Only these document types, as kind_detail in Values lists them.
familyinvoices, payments, buying, contracts, reports, people, otherA group of kinds, such as invoices or contracts.
company_iduuidA company's id, from find_company.
project_iduuidA project's id, from find_project.
site_iduuidA site's id.
issued_sincedateThe issue date, from.
issued_untildateThe issue date, up to.
due_sincedateAn invoice's due date, from.
due_untildateAn invoice's due date, up to.
gross_mindecimalThe gross from, in the business's currency.
gross_maxdecimalThe gross up to, in the business's currency.
directionincoming, outgoingincoming from suppliers, outgoing to customers.
statusopen, paidAn invoice's: open or paid.
categorystringAn ECLASS code of any level, from find_category.
limitintegerHow many rows at most.
titlestringThe table's title.
JSON
{
  "name": "search_documents",
  "arguments": {
    "query": "Bürostuhl",
    "match": "hybrid",
    "kinds": ["invoice"],
    "issued_since": "2026-01-01"
  }
}

search

Searches documents for ChatGPT's deep research and company knowledge.

ArgumentTypeMeaning
querystring, requiredWhat to find
JSON
{
  "name": "search",
  "arguments": {
    "query": "Wartungsvertrag Aufzug"
  }
}

fetch

Fetches a search result whole: its first four pages, up to 12,000 characters.

ArgumentTypeMeaning
idstring, requiredA result's id
JSON
{
  "name": "fetch",
  "arguments": {
    "id": "01a1b08c-7aa1-7b52-9d4e-2f1f1c0c4f11"
  }
}

figures:read

find_category

Turns words in any of Ocost's languages into ECLASS codes.

ArgumentTypeMeaning
wordsstring, requiredWords for a category, in any of Ocost's languages.
JSON
{
  "name": "find_category",
  "arguments": {
    "words": "Büromaterial"
  }
}

company_profile

Sums up a company's last 12 months: bought, sold, terms, open items and payment times.

ArgumentTypeMeaning
company_iduuid, requiredA company's id, from find_company.
JSON
{
  "name": "company_profile",
  "arguments": {
    "company_id": "01a1b08c-5c2d-7e10-8b3a-1d2e3f4a5b6c"
  }
}

project_overview

Compares a project's plan with what was spent and committed, by supplier and month.

ArgumentTypeMeaning
project_iduuid, requiredA project's id, from find_project.
JSON
{
  "name": "project_overview",
  "arguments": {
    "project_id": "01a1b08c-4b1c-7d20-9a4b-2c3d4e5f6a7b"
  }
}

query_figures

Adds up records for a chart, a comparison or a count.

ArgumentTypeMeaning
sourcedocuments, lines, invoices, … (11 values), requiredWhat to add up, such as invoices or lines.
group_bylist of object (field, bucket, level), requiredOne or two fields: the rows, then the columns.
measureobject (agg, field, signed)What to add up: a count, or a field's sum, average, minimum or maximum.
filterslist of object (field, values, since, until, min, max)Conditions on the source's fields.
yearintegerA year to add up. period replaces it.
compareprevious_period, previous_yearCompare with the period before, or the same period a year earlier.
top_nintegerOnly the largest groups.
matchingobject (query, match)Only the documents a search finds.
titlestringThe table's title.
periodstringPlain words, such as 2025, Q3 2025 or last year.
JSON
{
  "name": "query_figures",
  "arguments": {
    "source": "invoices",
    "measure": {"agg": "sum", "field": "net"},
    "group_by": [{"field": "company"}],
    "filters": [{"field": "direction", "values": ["incoming"]}],
    "period": "2025",
    "top_n": 10
  }
}

top_companies

Ranks the top suppliers or customers by net over a period.

ArgumentTypeMeaning
sidesuppliers, customers, default "suppliers"Suppliers (the default) or customers.
periodstringPlain words, such as 2025, Q3 2025 or last year.
sincedateFrom this date.
untildateUp to this date.
categorystringAn ECLASS code, or words.
ninteger, default 10How many to list.
titlestringThe table's title.
JSON
{
  "name": "top_companies",
  "arguments": {
    "side": "suppliers",
    "period": "2025",
    "n": 10
  }
}

spend_over_time

Gives net by month, quarter or year, by company or category if asked.

ArgumentTypeMeaning
periodstringPlain words, such as 2025, Q3 2025 or last year.
bucketmonth, quarter, year, default "month"Month (the default), quarter or year.
bycompany, categoryA column per company, or per ECLASS segment.
sidesuppliers, customers, default "suppliers"Suppliers (the default) or customers.
sincedateFrom this date.
untildateUp to this date.
titlestringThe table's title.
JSON
{
  "name": "spend_over_time",
  "arguments": {
    "period": "last 12 months",
    "bucket": "month",
    "by": "company"
  }
}

largest_documents

Lists the largest documents by gross over a period.

ArgumentTypeMeaning
kindstringA kind other than invoices to pay, such as credit_note.
sidesuppliers, customers, default "suppliers"Suppliers (the default) or customers.
periodstringPlain words, such as 2025, Q3 2025 or last year.
sincedateFrom this date.
untildateUp to this date.
ninteger, default 10How many to list.
titlestringThe table's title.
JSON
{
  "name": "largest_documents",
  "arguments": {
    "period": "Q3 2025",
    "n": 10
  }
}

payables_due

Lists unpaid supplier invoices due in a window, Skonto deadlines first.

ArgumentTypeMeaning
windowthis_week, next_7_days, next_14_days, next_30_days, this_monthWhen the invoices are due.
sincedateFrom this date.
untildateUp to this date.
company_iduuidA company's id, from find_company.
titlestringThe table's title.
JSON
{
  "name": "payables_due",
  "arguments": {
    "window": "next_14_days"
  }
}

vat_preview

Previews a USt-Voranmeldung by Kennzahl, for the tax adviser to check.

ArgumentTypeMeaning
periodstringA month (2026-10) or a quarter (2026-Q4).
kzstringA Kennzahl, to list its invoices.
titlestringThe table's title.
JSON
{
  "name": "vat_preview",
  "arguments": {
    "period": "2026-10"
  }
}

find_anomalies

Flags duplicate invoices, changed bank accounts and prices above the order.

ArgumentTypeMeaning
sincedateFrom this date.
untildateUp to this date.
kindslist of duplicate, bank_changed, price_above_orderOnly these flags.
titlestringThe table's title.
JSON
{
  "name": "find_anomalies",
  "arguments": {
    "since": "2026-08-01",
    "until": "2026-10-31",
    "kinds": ["bank_changed"]
  }
}

supplier_profile

Sums up a supplier in one call: spend, terms, payment speed, open items and prices.

ArgumentTypeMeaning
company_iduuid, requiredA company's id, from find_company.
JSON
{
  "name": "supplier_profile",
  "arguments": {
    "company_id": "01a1b08c-5c2d-7e10-8b3a-1d2e3f4a5b6c"
  }
}

exports:write

export_table

Exports a table another tool returned as Excel or CSV, behind a link valid for 30 minutes.

ArgumentTypeMeaning
queryobject (tool, args), requiredA table's query, unchanged, as a tool returned it.
titlestring, default "Ocost"The table's title.
formatxlsx, csv, default "xlsx"Excel (xlsx, the default) or CSV.
JSON
{
  "name": "export_table",
  "arguments": {
    "query": {"tool": "top_companies", "args": {"period": "2025"}},
    "title": "Top suppliers 2025",
    "format": "xlsx"
  }
}

make_datev_export

Makes the DATEV export of a period as one ZIP, behind a signed link.

Only through an OAuth connection, as the person who allowed it.

ArgumentTypeMeaning
starts_ondate, requiredThe period's first day.
ends_ondate, requiredThe period's last day, in the same fiscal year.
JSON
{
  "name": "make_datev_export",
  "arguments": {
    "starts_on": "2026-10-01",
    "ends_on": "2026-10-31"
  }
}