toconline-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GMAIL_CLIENT_ID | No | Your Google OAuth client ID for Gmail integration. | |
| TOCONLINE_GMAIL | No | Set to "1" to force Gmail tools to appear (even without Gmail credentials). | |
| TOCONLINE_API_BASE | No | Your tenant's API base URL (e.g., https://api14.toconline.pt). | |
| TOCONLINE_AUTH_URL | No | Your tenant's OAuth authorization URL (e.g., https://app14.toconline.pt/oauth/auth). | |
| TOCONLINE_ENV_FILE | No | Path to a custom .env file (default: ~/.config/toconline-mcp/.env). | |
| GMAIL_CLIENT_SECRET | No | Your Google OAuth client secret for Gmail integration. | |
| TOCONLINE_CLIENT_ID | No | Your TOCOnline OAuth client ID (from Empresa → Configurações → Dados API). | |
| TOCONLINE_LOG_LEVEL | No | Log level (DEBUG, INFO, WARNING, etc.). Logs go to stderr. | |
| TOCONLINE_TOKEN_URL | No | Your tenant's OAuth token URL (e.g., https://app14.toconline.pt/oauth/token). | |
| TOCONLINE_CLIENT_SECRET | No | Your TOCOnline OAuth client secret. | |
| TOCONLINE_CREDENTIALS_PATH | No | Override the TOCOnline credentials file location. | |
| TOCONLINE_GMAIL_CREDENTIALS_PATH | No | Override the Gmail credentials file location. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| auth_statusA | Report whether TOCOnline credentials are configured and their expiry. Fast, no side effects. Call this to decide whether to prompt the user
through |
| loginA | Open a browser and complete OAuth login against TOCOnline. The user must have registered This tool blocks for up to 3 minutes while waiting for the browser callback; ask the user to complete the consent promptly. |
| logoutA | Delete the stored TOCOnline credentials and drop in-memory tokens. |
| get_current_companyA | Return the authenticated company's own profile. Includes Use this when you need the reporting entity's own identity — for example when producing tax-authority reports (Modelo 30, SAFT-PT), where you need the company's NIPC as the reporter, not the customer's. |
| list_customersA | List customers. All filters are exact match. |
| get_customerA | Fetch a single customer by id. |
| create_customerB | Create a customer. Returns the created record. |
| update_customerA | Update a customer. Only non-null fields are sent. |
| delete_customerA | Delete a customer. Requires |
| list_suppliersB | List suppliers. All filters are exact match. |
| get_supplierB | Fetch a single supplier by id. |
| create_supplierA | Create a supplier. Returns the created record. Contacts (email/phone) and addresses are separate resources — use
|
| update_supplierA | Update a supplier. Only non-null fields are sent. |
| delete_supplierA | Delete a supplier. Requires |
| list_productsC | List products. All filters are exact match. |
| get_productA | Fetch a single product by id. |
| create_productB | Create a product. Returns the created record. |
| update_productA | Update a product. Only non-null fields are sent. |
| delete_productA | Delete a product. Requires |
| list_servicesA | List services. All filters are exact match. Services live at |
| get_serviceB | Fetch a single service by id. |
| create_serviceB | Create a service. Returns the created record. |
| update_serviceB | Update a service. Only non-null fields are sent. |
| delete_serviceA | Delete a service. Requires |
| list_countriesB | List countries (ISO codes, names). |
| list_item_familiesA | List item families — used to categorize products/services ( |
| list_units_of_measureB | List units of measure (unidades) for document lines. |
| list_tax_descriptorsA | List tax descriptors — VAT rates and their codes ( |
| list_cash_accountsB | List cash accounts (caixas) used for receipts/payments. |
| list_sales_documentsA | List commercial sales documents, newest first by default. Use |
| get_sales_documentC | Fetch a sales document, optionally with its line items merged. |
| create_sales_documentA | Create a sales document with line items. Two code paths depending on
v1 ignores Customer identity (name, tax number, address) is denormalized onto the
header by TOCOnline server-side, on both paths — but only from the
customer's main address. If the header comes back with an empty
Date: on a certified series the date cannot precede the series' last issued document. The API enforces this; we don't pre-check it (a type can have multiple series, so a client-side guess would risk blocking valid emissions). |
| delete_sales_documentA | Delete a draft sales document. Use this for cleaning up unfinalised drafts (e.g. orphans left behind
by a failed |
| list_sales_receiptsB | List sales receipts (customer payments), newest first by default. |
| get_sales_receiptA | Fetch a single sales receipt by id. |
| create_sales_receiptA | Create a sales receipt (customer payment) record. Note: this creates the receipt itself. To settle specific sales
documents against it, add |
| create_sales_receipt_lineB | Settle a sales document against a receipt (settlement line). Links an existing receipt to a receivable so the document is marked paid. Field values (how much settles what) are the caller's responsibility — this tool only builds the documented payload. |
| list_purchase_documentsB | List commercial purchase documents, newest first by default. |
| get_purchase_documentA | Fetch a purchase document, optionally with its line items merged. |
| create_purchase_documentA | Create a purchase document with lines in a single v1 call. Supplier identity fields (tax number, business name) are denormalized from the supplier record. |
| list_purchase_paymentsC | List purchase payments, newest first by default. |
| get_purchase_paymentA | Fetch a single purchase payment by id. |
| create_purchase_paymentA | Create a purchase payment record. Note: this creates the payment itself. To settle specific purchase
document lines against it, add |
| create_purchase_payment_lineA | Settle a purchase document line against a payment (settlement line). Links an existing payment to a payable so the document line is marked
paid. Note the payable is a document line ( |
| list_addressesA | List addresses. Normally scope to a customer_id or supplier_id. Scoping uses the nested route ( |
| get_addressA | Fetch a single address by id. |
| create_addressA | Create an address attached to a customer or supplier. TOCOnline uses a polymorphic association — the parent is identified
via the Returns the created (or, on a duplicate, the existing) address re-fetched by id, so the parent link and all fields are populated — the raw POST echo omits them, which makes the address look empty/unlinked. TOCOnline enforces a uniqueness constraint on address_detail + postcode
per parent and raises |
| update_addressA | Update an address. Only non-null fields are sent. |
| delete_addressA | Delete an address. Requires |
| list_contactsB | List contacts. Normally scope to a customer_id or supplier_id. |
| get_contactA | Fetch a single contact by id. |
| create_contactC | Create a contact attached to a customer or supplier. Polymorphic association via |
| update_contactA | Update a contact. Only non-null fields are sent. |
| delete_contactA | Delete a contact. Requires |
| list_bank_accountsA | List company bank accounts (name, IBAN, SWIFT, type). Each item is enriched with two derived fields:
Both are These derived fields are what Portuguese reports like Modelo 30 (foreign payments declaration) and IES bank annexes ask for. |
| get_bank_accountA | Fetch a single bank account by id, enriched with derived |
| list_bank_transactionsA | List bank transactions (movements) imported into TOCOnline. All filters are exact match. To get a date range, make one call per
day or page through without a date filter. |
| get_bank_transactionB | Fetch a single bank transaction by id. |
| get_document_pdf_urlA | Get a signed, shareable URL to a PDF render of a document or receipt. Returns a short-lived URL on Only finalized documents have a PDF. A draft (status 0) returns a "not ready for print" error — finalize it first. |
| send_document_emailA | Send a sales document or receipt to a recipient by email. Uses TOCOnline's built-in email delivery — the message arrives from TOCOnline's mail servers with your document attached / linked. |
| finalize_sales_documentA | Finalize (issue) a draft sales document. Once finalized, the document becomes fiscally valid and immutable.
Requires |
| finalize_purchase_documentB | Finalize a draft purchase document. |
| communicate_sales_document_atA | Communicate a finalized sales document to the AT (Portuguese tax authority). Triggers TOCOnline's |
| communicate_purchase_document_atA | Communicate a finalized purchase document to the AT (Portuguese tax authority). |
| void_sales_receiptC | Void (anular) a sales receipt. |
| void_purchase_documentC | Void (anular) a purchase document. |
| api_requestA | Escape hatch for endpoints not covered by typed tools. Path must match |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/themiguelamador/toconline-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server