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 #
| Parameter | Value | Notes |
|---|---|---|
| Address | MCP server Not available yet | The same for every assistant. |
| Transport | http | Streamable HTTP, no session: every POST request stands alone. |
| Server name | podatekgieldy | In the Claude Code command. The assistant lists the tools under this name. |
| Sign-in | OAuth | Your Podatek Giełdy account. The assistant opens the sign-in itself on the first connection. |
POST https://podatekgieldy.pl/mcp
Authorization: Bearer $TAXROAM_TOKEN
Content-Type: application/jsonNot available yet
The assistant sends its sign-in token here. Without it the server answers 401.
POST https://taxroam.com/api/validate
POST https://taxroam.com/api/calculatevalidate works without signing in. calculate: the sign-in token in Authorization: Bearer. Details: the HTTP API page.
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.
| Tool | What it does | HTTP |
|---|---|---|
| access_status | What 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. | — |
| rules | The rulebook: how to turn a statement into numbers. | GET /rulebook/pl/v1 |
| validate | Checks the contract, detects personal data and says whether the data is complete. Computes no tax. | POST /api/validate |
| calculate | The tax, the PIT-38 and PIT/ZG form positions, the section breakdown, the corrections. It stores none of your data. | POST /api/calculate |
| list_transactions | The transactions saved in your account on podatekgieldy.pl, page by page (nextCursor), filtered by year, broker, type or symbol. Changes nothing. | — |
| calculate_saved | A 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_report | One 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_issues | The 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_preview | A 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_preview | A 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_preview | A preview of editing saved transactions by their id: each row before and after. The site computes the PLN amounts. Changes nothing. | — |
| delete_transactions_preview | A 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_change | Makes 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_status | Where a change stands (state: pending, running, done, refused, interrupted), how many rows were saved and deleted, and which were skipped. Changes nothing. | — |
{
"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" }
}]
}
}
}
}curl https://taxroam.com/api/validate \
-H "Content-Type: application/json" \
-d @data.jsonHTTP/1.1 200 OK
{
"ok": true,
"transactionCount": 1,
"taxYear": 2025,
"warnings": [],
"check": {
"calculationStatus": "INCOMPLETE",
"incompleteReasons": [{ "code": "MISSING_BUY_HISTORY", "count": 1 }],
"corrections": [],
"notChecked": ["NBP_RATES"]
},
"completeness": { "status": "INCOMPLETE", "message": "…", "reasons": […] }
}data.json: contract v1, the same object as payload over MCP.
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:
calculateneither 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.
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" }
}Not available yet
After this header Claude opens the sign-in by itself.
HTTP/1.1 401 Unauthorized
{
"ok": false,
"code": "UNAUTHORIZED",
"message": "Zaloguj się kontem Podatku Giełdy: Authorization: Bearer <token>."
}Server responses when connecting #
| HTTP | JSON-RPC | When | What to do |
|---|---|---|---|
| 401 | -32000 | Not signed in, or the sign-in token does not work. | Connect and sign in again. |
| 429 | -32000 | More than 4 calls at once, or 600 an hour (by default). | Wait as many seconds as Retry-After says. |
| 413 | -32600 | A body over 4 MB. | Over MCP send up to about 10 000 transactions; larger ones over HTTP with gzip. |
| 400 | -32700 | The body is not valid JSON. | Fix the request. |
| 400 | -32600 | The JSON is not a JSON-RPC request. | Fix the request. |
| 405 | -32000 | GET /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.
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."
}
}HTTP/1.1 429 Too Many Requests
Retry-After: 3600
{
"ok": false,
"code": "RATE_LIMITED",
"message": "Za dużo sprawdzeń. Spróbuj ponownie za godzinę.",
"resetsAt": "2026-11-12T15:00:00+00:00"
}