Skip to main content
Glama

get_company_readiness

Read-onlyIdempotent

Whether the company can issue right now, and if not, what to fix.

Call it before a company's first document, and when issuing fails for a reason that is not the document's. ready is false with missing naming the cause; by_document_type has it per nfe and nfse, each blocker with the fields at fault and each warning a default being declared; fix_url is the dashboard screen for the first blocker.

What to do with it:

  • address: offer to fill it in here. Read the company's own registry row with lookup_taxpayer, show the user the address, and call update_company once they confirm.

  • state_registration: ask the user for the IE, then update_company.

  • certificate, certificate_expired, certificate_unreadable, plan: only the dashboard fixes them; give the user fix_url.

  • update_company refused for lack of company:write: give fix_url and tell the user to reconnect Stackin to allow company settings.

Do not call it again until something changed — an update_company, or the user saying they fixed it: the answer will be the same. Also the certificate's expiry, the tax regime (CRT), the state, the default série per document type and what the registry suggests for the fiscal fields. Read-only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_company_readiness"
  }
}

Input Schema

NameRequiredDescriptionDefault
company_idNoUUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both.
company_tax_idNoCNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit for a single company; else see list_authorized_companies. Send one, never both.

Output Schema

NameRequiredDescriptionDefault
nameNo
readyNoAt least one document type can be issued.
stateNo
tax_idNo
fix_urlNoThe dashboard screen that fixes the first blocker. Null when nothing blocks.
missingNoWhy not: certificate, certificate_expired, certificate_unreadable, address, state_registration, plan. Empty when ready.
company_idNo
tax_regimeNoCRT: 1 Simples, 2 Simples excesso, 3 normal, 4 MEI.
environmentNohomologation or production.
default_seriesNoThe série used per document type when none is sent.
has_certificateNo
by_document_typeNoPer nfe/nfse: ready, missing [{code, fields}] with the fields at fault, and warnings [{code}] for a default being declared (tax_regime_default, simples_nacional_default, service_code_default).
certificate_expires_atNo
suggested_fiscal_fieldsNoWhat the CNPJ registry suggests for tax_regime and simples_nacional. A suggestion for the user to confirm, never applied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / company_id / description
      Previous value: -"UUID of the company acted for. Omit it if the connection covers a single company; else see list_authorized_companies. company_id or company_tax_id, never both."New value: +"UUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both."
    • changedInput schema / properties / company_tax_id / description
      Previous value: -"CNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit it if the connection covers a single company; else see list_authorized_companies. company_id or company_tax_id, never both."New value: +"CNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit for a single company; else see list_authorized_companies. Send one, never both."
  2. Changed2 schema fields changed
    • changedInput schema / properties / company_id / description
      Previous value: -"UUID of the company this call acts for. Omit it when the connection covers a single company; with several it is required (see list_authorized_companies). Send company_id or company_tax_id, never both."New value: +"UUID of the company acted for. Omit it if the connection covers a single company; else see list_authorized_companies. company_id or company_tax_id, never both."
    • changedInput schema / properties / company_tax_id / description
      Previous value: -"CNPJ or CPF of the company this call acts for, never the recipient or a taxpayer being looked up. Omit it when the connection covers a single company; with several it is required (see list_authorized_companies). Send company_id or company_tax_id, never both."New value: +"CNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit it if the connection covers a single company; else see list_authorized_companies. company_id or company_tax_id, never both."
  3. Changed5 schema fields changed
    • addedOutput schema / properties / by_document_type
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Per nfe/nfse: ready, missing [{code, fields}] with the fields at fault, and warnings [{code}] for a default being declared (tax_regime_default, simples_nacional_default, service_code_default)."
      +}
    • addedOutput schema / properties / fix_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The dashboard screen that fixes the first blocker. Null when nothing blocks."
      +}
    • changedOutput schema / properties / missing / description
      Previous value: -"Why not: certificate, certificate_expired, certificate_unreadable, address. Empty when ready."New value: +"Why not: certificate, certificate_expired, certificate_unreadable, address, state_registration, plan. Empty when ready."
    • addedOutput schema / properties / ready / description
      Added value: +"At least one document type can be issued."
    • addedOutput schema / properties / suggested_fiscal_fields
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "What the CNPJ registry suggests for tax_regime and simples_nacional. A suggestion for the user to confirm, never applied."
      +}
  4. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, it explains the shape of a negative result: ready false, missing naming the cause, by_document_type coverage for nfe and nfse, blocker fields, warning defaults, and what fix_url points to. It also states an idempotent-style behavior: the answer will be the same until an update or user fix occurs.

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?

The description is front-loaded with the core question and uses a clear bulleted remediation list. It is somewhat long, and the trailing sentence about certificate expiry, tax regime, state, and default série is list-like and less well integrated, but most content earns its place.

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?

For a read-only readiness checker with two optional identifying parameters and an output schema, the description supplies the when-to-use rule, remediation paths per blocker type, and re-call guidance. That is enough for an agent to invoke and act on the result correctly.

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

Parameters3/5

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

Schema coverage is 100%, so both company_id and company_tax_id are already documented in the input schema. The description adds no additional parameter meaning, but the schema carries that burden adequately.

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?

The description states a specific decision the tool makes: whether the company can issue invoices right now and, if not, what is blocking it. It also distinguishes the tool from document-level failure tools by saying it applies when issuing fails for a reason that is not the document's.

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

Usage Guidelines5/5

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

It gives explicit timing: call before a company's first document, and after an issuing failure not caused by the document. It also names alternatives for fixing blockers, such as lookup_taxpayer and update_company, and warns not to re-call until something changed.

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.