Skip to main content
Glama

validar_cst

Validate CST/CSOSN codes against the correct tax regime to prevent NF-e and SPED errors. Checks ICMS, PIS/COFINS, IPI, and CSOSN offline without requiring a connection.

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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.5.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses offline behavior, in-memory validation tables, and that no connection is required, which is useful. It also implies non-destructive validation, but does not explicitly state the operation is read-only or what the return structure is (though output schema exists). This is adequate but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured into purpose, when to use, behavior, and parameter details. Every sentence adds value, and the most critical information (purpose and usage) is front-loaded. No fluff or redundancy.

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?

The description is complete for a validation tool with two parameters and an output schema. It covers purpose, usage context, offline behavior, and parameter formats. The output schema handles return details, so nothing essential is 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?

The schema already covers both parameters with examples (100% coverage). The description adds value by specifying digit lengths for different CST types (3 digits for ICMS, 2 for PIS/COFINS/IPI, 3 for CSOSN), which goes beyond the schema examples and helps the agent construct valid inputs.

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 clearly states the tool validates CST/CSOSN codes, with a specific verb and resource. It distinguishes itself from siblings by focusing on validation rather than lookup or generation, and it specifies the purpose (confirm validity before issuing NF-e or SPED). The distinction is clear even without naming alternatives.

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?

It explicitly says when to use ('ao preencher o campo CST/CSOSN na NF-e ou no SPED EFD'), providing clear context. However, it does not mention when not to use it or mention alternative tools (e.g., consultar_cst for detailed information), so it lacks explicit exclusions or alternatives.

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

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/AgileConecta/RTC-MCP_FISCAL'

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