Skip to main content
Glama
ddiax09

ASPEL SAE MCP Server

by ddiax09

get_document_details

Get details of an invoice, order, remittance, or quote, including line items and the warehouse assigned to each item.

Instructions

Consulta un documento comercial (factura, pedido, remisión o cotización) y el desglose de sus partidas, identificando de qué almacén (NUM_ALM) proviene o fue asignada cada mercancía.

Args: cve_doc: Folio del documento (ej. '1024' o 'A1024'). tipo_doc: Tipo de documento: 'factura', 'pedido', 'remision' o 'cotizacion'. empresa: Clave de empresa (opcional).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cve_docYes
empresaNo
tipo_docNofactura

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/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 uses the verb 'Consulta' which strongly implies a read-only operation, and it discloses the output focus (line items and warehouse). However, it does not explicitly state that the tool has no side effects, mention permission requirements, or describe behavior on missing documents. The disclosure is moderate but leaves some behavioral aspects unaddressed.

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 two sentences of purpose followed by a compact Args list. It is front-loaded with the primary action and resource, uses no filler, and each sentence earns its place. The structure is clean and scannable for an agent.

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 that an output schema exists (so return values are already documented) and the parameter set is small and simple, the description is sufficient for correct invocation. It covers the tool's purpose and all parameters clearly. Minor gaps like explicit side-effect declaration or failure behavior are mitigated by the 'consulta' wording and the presence of the output schema.

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 description coverage is 0%, so the description must compensate, and it does. The Args section explains every parameter: cve_doc with an example ('1024' or 'A1024'), tipo_doc with its allowed values ('factura', 'pedido', 'remision', 'cotizacion'), and empresa marked as optional. This adds meaning well beyond the bare schema titles and defaults, though it doesn't dive into edge cases like format constraints for empresa.

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 starts with a specific verb and resource: 'Consulta un documento comercial' and enumerates the four document types (factura, pedido, remisión, cotización). It also states the key output component (desglose de partidas with warehouse identification), which makes it clearly distinct from sibling tools like get_stock_by_warehouse or get_product_kardex that operate on stock or product data rather than commercial documents.

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

Usage Guidelines3/5

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

The description implies when to use the tool (when you need details of a specific commercial document and its line items/warehouse assignment), but it gives no explicit comparison with alternatives, no 'use X instead' guidance, and no exclusions. An agent must infer the routing from the purpose statement alone, which is acceptable but not actively guiding.

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