Skip to main content
Glama

consultar_cfop

Determine the legal nature of Brazilian fiscal operations by looking up CFOP codes. Use it to classify entries and exits for NF-e, SPED EFD-ICMS/IPI, and accounting.

Instructions

Consulta o Código Fiscal de Operações e Prestações (CFOP). Purpose: identificar a natureza jurídica de uma operação fiscal para preenchimento de NF-e, SPED EFD-ICMS/IPI e escrituração contábil. Quando usar: ao emitir nota fiscal, classificar entradas/saídas ou analisar obrigações acessórias. Comportamento offline: lê dicionário em memória com todos os grupos CFOP; não requer conexão. Formato do parâmetro: 4 dígitos numéricos (ex: '5102', '6101', '1556'). Grupos: 1/2/3 = entradas (estadual/interestadual/exterior); 5/6/7 = saídas (estadual/interestadual/exterior).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cfopYesCodigo CFOP com 4 digitos numericos (ex.: "5102", "6101", "2556").

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.3/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 that the tool works offline by reading an in-memory dictionary with all CFOP groups and requires no network connection. It also explains the group classification (1/2/3 for entries, 5/6/7 for exits) which is behavioral detail beyond the schema. It does not describe the return format, but an output schema is indicated as present.

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 well-structured with clear sections: purpose, when to use, offline behavior, parameter format, and group logic. It is slightly long but every sentence adds value, and the most important information (purpose and usage) is front-loaded. It could be slightly more concise but is appropriately organized.

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 (single parameter, lookup operation), the description covers purpose, usage context, behavioral constraints, and parameter semantics. It does not explicitly state return values, but the presence of an output schema (indicated by 'Has output schema: true') means that information is available elsewhere. It is sufficiently complete for an agent to call it correctly.

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% since the only parameter 'cfop' is described with a format and example. The description adds extra meaning by explaining the 4-digit format with examples and the group semantics (entries vs exits by region), which goes beyond the schema's basic description. This enhances understanding of 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 states a specific verb ('Consulta') and a well-defined resource (CFOP code), and immediately explains its purpose: identifying the legal nature of a fiscal operation for NF-e, SPED, and accounting. This clearly distinguishes it from siblings like consultar_ncm, validar_cst, and consultar_cest, which handle other 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?

It explicitly provides a 'Quando usar' section: when issuing invoices, classifying entries/exits, or analyzing ancillary obligations. This gives clear context for when to call the tool, though it does not explicitly mention when not to use it or compare with alternatives. The offline behavior is also mentioned, which is a useful constraint.

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