Skip to main content
Glama
nikolasdehor

mcp-fiscal-brasil

by nikolasdehor

validar_cst

Validate CST/CSOSN codes against tax regime tables to ensure correct NF-e and SPED entries. Works offline with no API required.

Instructions

Valida um Código de Situação Tributária (CST) ou Código de Situação da Operação no Simples Nacional (CSOSN). Purpose: confirmar se o código informado é válido para o regime tributário antes de emitir NF-e ou escriturar no SPED. Quando usar: ao preencher o campo CST/CSOSN na NF-e ou no SPED EFD. Comportamento offline: valida contra tabelas em memória (ICMS, PIS/COFINS, IPI, CSOSN); não requer conexão. Parâmetro 'regime': use 'normal' para Lucro Real/Presumido/Arbitrado ou 'simples' para Simples Nacional. Parâmetro 'cst': 3 dígitos para CST ICMS (ex: '000', '040'), 2 dígitos para CST PIS/COFINS/IPI (ex: '01', '50'), 3 dígitos para CSOSN (ex: '101', '400').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cstYesCodigo a validar. Exemplos: "000" (CST ICMS), "50" (CST PIS/COFINS), "101" (CSOSN Simples Nacional).
regimeYesRegime tributario: "normal" (Lucro Real, Presumido ou Arbitrado) ou "simples" (Simples Nacional).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations provided, so description carries full burden. It discloses offline validation against in-memory tables and parameter formats. However, it does not describe the return value or error handling behavior, which is relevant for a validation tool.

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?

Well-structured with clear sections and front-loaded purpose. Could be slightly more concise, but each sentence adds information. The length is justified by the additional usage context and parameter details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 required params, output schema exists), the description covers usage, offline behavior, and parameter formats. It is complete enough for an agent to use correctly, though return value details are missing.

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

Parameters4/5

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

Schema coverage is 100%, but description adds value by explaining the distinction between 'normal' and 'simples' for regime, and the expected digit lengths for different CST types. This goes beyond the schema descriptions.

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?

Clearly states it validates CST/CSOSN codes and specifies the purpose: confirm validity for tax regime before issuing NF-e or writing in SPED. The verb 'validar' and resource are specific, and it distinguishes from sibling validation tools by focusing on tax codes.

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

Usage Guidelines4/5

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

Explicitly states when to use: when filling CST/CSOSN field in NF-e or SPED EFD. Also mentions offline behavior. Lacks explicit exclusions or alternatives, but context is clear given sibling tools cover different validations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/nikolasdehor/mcp-fiscal-brasil'

If you have feedback or need assistance with the MCP directory API, please join our Discord server