DocumentationReference

Tool reference

The server address and parameters, the tools the assistant sees, what it sends us and how the server answers.

On this page

One switch for the whole page: every example below shows in the form you choose. The assistant speaks MCP, your own script speaks HTTP.

Address and parameters #

ParameterValueNotes
Address
MCP server
https://podatekgieldy.pl/mcp
The same for every assistant.
TransporthttpStreamable HTTP, no session: every POST request stands alone.
Server namepodatekgieldyIn the Claude Code command. The assistant lists the tools under this name.
Sign-inOAuthYour Podatek Giełdy account. The assistant opens the sign-in itself on the first connection.
Every request · headers
POST https://podatekgieldy.pl/mcp
Authorization: Bearer $TAXROAM_TOKEN
Content-Type: application/json

The assistant sends its sign-in token here. Without it the server answers 401.

Tools after connecting #

The assistant sees fourteen tools. The first four calculate from the numbers the assistant sends; the other ten read and change the data saved in your account on podatekgieldy.pl, after you allow it on the consent page when you connect. Every change is a preview first and is made only after your yes. validate and calculate take the whole contract in the payload argument, as an object, not as text. The contract format is in the rules v1; the assistant fetches them with the rules tool.

ToolWhat it doesHTTP
access_statusWhat the assistant may do on your account in each country: a file import without saving, an import with saving and adding transactions, or everything; until when, and where to choose the plan. The assistant calls it first.—
rulesThe rulebook: how to turn a statement into numbers.GET /rulebook/pl/v1
validateChecks the contract, detects personal data and says whether the data is complete. Computes no tax.POST /api/validate
calculateThe tax, the PIT-38 and PIT/ZG form positions, the section breakdown, the corrections. It stores none of your data.POST /api/calculate
list_transactionsThe transactions saved in your account on podatekgieldy.pl, page by page (nextCursor), filtered by year, broker, type or symbol. Changes nothing.—
calculate_savedA year’s tax from your saved transactions, with the same calculation as the podatekgieldy.pl dashboard: its year settings and the losses carried over from earlier years. You send no transactions. Changes nothing.—
get_reportOne form for the year from your saved data: PIT-38, PIT/ZG or dividends, with its positions and a table ready to show. Changes nothing.—
list_issuesThe year’s problems in your saved data, as in the «Problemy» tab on podatekgieldy.pl: what changes the figure and what is only a notice. Changes nothing.—
import_file_previewA preview of importing a broker file, byte for byte, with the same import as podatekgieldy.pl: new rows, duplicates, replaced and removed rows, and also what we read from the file (per year and type, sums, skipped rows) and the tax of each tax year with at most 10 sales, that is closed positions (without the Professional plan, of one tax year). Rows we did not read, the assistant sends in another preview of the same file. Works on every plan; without the Professional plan nothing is saved. Changes nothing.—
add_transactions_previewA preview of adding transactions, as in the «Dodaj transakcję» window on podatekgieldy.pl: you send the fields in the trade currency, the site computes the PLN amounts and the NBP rate. Fields that look like personal data are refused. From the Professional plan. Changes nothing.—
edit_transactions_previewA preview of editing saved transactions by their id: each row before and after. The site computes the PLN amounts. Changes nothing.—
delete_transactions_previewA preview of deleting saved transactions, chosen by id or by a filter. Deleted rows can be restored in «Historia zmian» on podatekgieldy.pl. Changes nothing.—
apply_changeMakes the change from a preview (changeId), only after you say yes to it. It never deletes more than the preview showed and skips rows changed since. A change over the limit you confirm yourself on podatekgieldy.pl, from the link (confirmUrl) the assistant gives you.—
change_statusWhere a change stands (state: pending, running, done, refused, interrupted), how many rows were saved and deleted, and which were skipped. Changes nothing.—
Request · tools/call validate
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "validate",
    "arguments": {
      "payload": {
        "contractVersion": "1",
        "jurisdiction": "PL",
        "taxYear": 2025,
        "transactions": [{
          "externalId": "175eefb6-200b-4773-b7f1-392e309de9ce",
          "type": "SELL",
          "instrument": { "isin": "US0378331005", "ticker": "AAPL" },
          "tradeDate": "2025-04-17",
          "settlementDate": "2025-04-21",
          "quantity": 10,
          "price": 172.35,
          "currency": "USD",
          "account": { "broker": "trading212", "accountId": "acc-1" }
        }]
      }
    }
  }
}

What the assistant does with your data #

  • The assistant reads the broker file. It sends taxroam the rows of the contract: dates, tickers or ISINs, quantities, prices, and for the account the broker name and your own label (such as acc-1), never the account number.
  • A full name, an e-mail, an IBAN or a PESEL in a text field (the row id, the ticker, the account label) refuses the whole request (PII_DETECTED). A long run of digits, 12 or more, only warns (LONG_DIGIT_RUN) and does not block. The value never comes back in the reply.
  • Taxroam does not ask for consent before a calculation: calculate neither changes nor stores your data. Whether the assistant asks before calling a tool depends on its settings. What it sent shows in the chat, in the tool call details.
  • None of your data is stored between calculations: each one computes only what came with it.

Not signed in: 401 #

Without signing in the server answers 401 before it runs any tool. After this response the assistant opens the sign-in by itself.

Response · not signed in
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer resource_metadata="https://podatekgieldy.pl/.well-known/oauth-protected-resource/mcp", scope="email offline_access"

{
  "jsonrpc": "2.0",
  "id": null,
  "error": { "code": -32000, "message": "Unauthorized" }
}

After this header Claude opens the sign-in by itself.

Server responses when connecting #

HTTPJSON-RPCWhenWhat to do
401-32000Not signed in, or the sign-in token does not work.Connect and sign in again.
429-32000More than 4 calls at once, or 600 an hour (by default).Wait as many seconds as Retry-After says.
413-32600A body over 4 MB.Over MCP send up to about 10 000 transactions; larger ones over HTTP with gzip.
400-32700The body is not valid JSON.Fix the request.
400-32600The JSON is not a JSON-RPC request.Fix the request.
405-32000GET /mcp: the SSE stream is not supported.Send POST.

Refusals by the tools themselves, such as CONTRACT_INVALID or PII_DETECTED, carry a code in the reply. What each one means is on the Refusals page.

Response · hourly limit
HTTP/1.1 429 Too Many Requests
Retry-After: 1260

{
  "jsonrpc": "2.0",
  "id": null,
  "error": {
    "code": -32000,
    "message": "Too many requests from this account: the limit is 600 an hour. Try again in 21 min."
  }
}