Skip to main content
Glama

Buscar en la legislacion

buscar_ley

Busqueda de texto completo en la legislacion mexicana. Devuelve articulos con extracto, cita y fuente. Filtra por materia, ambito, entidad o un documento_id. Consume saldo (servicio LEGAL; tarifa vigente en consultar_precios) cuando hay resultados; una busqueda sin coincidencias no cobra. Trae deslinde.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYes
ambitoNo
limiteNo
entidadNo
materiaNo
documentoNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notaNo
totalNo
consultaNo
deslindeNo
resultadosNo
operacion_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "legal_buscar — 1 muestra(s), 6 campos.",
      +  "properties": {
      +    "consulta": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Consulta"
      +    },
      +    "deslinde": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Deslinde"
      +    },
      +    "nota": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Nota"
      +    },
      +    "operacion_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Operacion Id"
      +    },
      +    "resultados": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Resultados"
      +    },
      +    "total": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Total"
      +    }
      +  },
      +  "title": "RLegalBuscar",
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior4/5

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

Annotations indicate readOnlyHint=false and openWorldHint=true, but the description adds valuable context: it consumes balance (LEGAL service) only when results are found, and includes a disclaimer. This goes beyond the annotations and clarifies side effects and cost behavior, which is important for agent decision-making.

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 three sentences long, starting with the core purpose, then filters, then cost and disclaimer. It is efficient and front-loaded, with no redundant phrasing. The structure is logical and easy to parse.

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

Completeness3/5

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

With six parameters, no schema descriptions, and an output schema present, the description covers purpose, filters, and cost but leaves gaps. It does not explain the meaning or accepted values of parameters like materia, ambito, or entidad, nor does it clarify the required 'q' parameter. The return format is presumably covered by the output schema, so that is acceptable. Overall, it is adequate but not exhaustive.

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?

Schema description coverage is 0%, so the description must compensate. It mentions filters for materia, ambito, entidad, and documento, mapping to four of the six parameters. However, it omits the required 'q' parameter (the search query) and 'limite' (limit), leaving the most essential parameter undocumented. This partial coverage earns a 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs full-text search in Mexican legislation and returns articles with excerpt, citation, and source. It specifies the resource and action distinctly, though it doesn't explicitly contrast with sibling tools like consultar_ley or catalogo_leyes. The filters are mentioned, but the differentiation from alternatives is not explicit.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like consultar_ley or catalogo_leyes. It notes the cost implications, which is relevant for usage decisions, but there is no explicit statement of use cases or exclusions. An agent would have to infer when to choose this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources