Skip to main content
Glama
ssolis-ti

Compra Ágil MCP Server

Detalle de una Orden de Compra

obtener_detalle_orden_compra
Read-only

Fetch complete Mercado Público purchase order details by numeric ID or external code from another source, covering amounts, buyer, awarded supplier, and products.

Instructions

Obtiene el detalle completo de una Orden de Compra (OC) emitida en Mercado Público de Chile: montos (neto, impuestos, total), comprador, proveedor adjudicado y listado de productos adquiridos. Admite el ID numérico o el código alfanumérico externo. ⚠ EL CÓDIGO DEBE VENIR DE OTRA FUENTE. Consulta la API legada de Órdenes de Compra, que es independiente de la de Compra Ágil — y esta última NO entrega códigos de OC (verificado: id_orden_compra viene null en el 100% de los procesos). Úsala cuando ya tengas el código por otra vía: la OC que te emitieron como proveedor, un correo de Mercado Público o la ficha pública del proceso. No esperes obtenerlo con las demás herramientas de este servidor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codigo_ocYesCódigo alfanumérico (ej: "1057532-156-AG26") o ID numérico (ej: "54909627") de la Orden de Compra.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety/profile burden is largely covered. The description adds valuable provenance context (the code must come from an external source and 'id_orden_compra viene null en el 100% de los procesos'), but it does not describe the return format, pagination, or error behavior when a code is invalid.

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?

Front-loads the capability, then the critical constraint. The warning is genuinely load-bearing, though the caution is stated twice ('Úsala cuando ya tengas el código por otra vía' and 'No esperes obtenerlo con las demás herramientas'), a mild redundancy that trims efficiency.

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 single-parameter read tool with no output schema, the description covers what is returned (montos, comprador, proveedor, productos), the accepted input formats, and the critical precondition for obtaining the code. An agent has everything needed to call it correctly or recognize it cannot.

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?

With one parameter at 100% schema coverage, the schema fully documents codigo_oc including both accepted formats and examples. The description repeats the dual-format acceptance ('ID numérico o código alfanumérico externo') without adding syntax or validation detail beyond the schema, so the baseline of 3 is appropriate.

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?

States a specific verb and resource (obtener el detalle completo de una Orden de Compra) and enumerates exactly what the detail contains: montos, comprador, proveedor adjudicado y productos adquiridos. It also distinguishes itself from the sibling Compra Ágil tools by clarifying that this is the legacy OC API and a separate data source.

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?

Explicit about when to use it and when not to: 'Úsala cuando ya tengas el código por otra vía' plus concrete sources (la OC emitida como proveedor, un correo, la ficha pública del proceso). It actively warns against expecting this server's other tools to supply the code, which routes the agent away from a dead end.

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