Skip to main content
Glama

Construir query string

query-build
Read-onlyIdempotent

Serializa un objeto como cadena de consulta; arreglos repiten la clave o usan corchetes. Cuándo: hay que leer, construir o revisar con exactitud una URL, una cabecera HTTP, un token, una versión, un rango de IP, un documento HTML o Markdown o un archivo para agentes. No para: convertir una cadena de consulta en un objeto (query-parse). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Serializes an object to an application/x-www-form-urlencoded query string; arrays repeat the key (a=1&a=2) or use brackets (a[]=1), nested objects use brackets, nulls are skipped. When: a URL, HTTP header, token, version string, IP range, HTML or Markdown document or agent-readiness file has to be parsed, built or checked exactly. Not for: parsing a URL query string (query-parse). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
sortNoSort keys (boolean; optional; default false).
paramsYesParameters object (object; required).
array_formatNoArray style (optional; one of: repeat, brackets, comma; default "repeat").repeat

Output Schema

NameRequiredDescriptionDefault
queryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / params / examples
      Added value: +[
      +  {
      +    "empty": null,
      +    "n": 1,
      +    "q": "hola mundo",
      +    "tag": [
      +      "a",
      +      "b"
      +    ]
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Serializes an object to an application/x-www-form-urlencoded query string; arrays repeat the key (a=1&a=2) or use brackets (a[]=1), nested objects use brackets, nulls are skipped. When: a URL, HTTP header, token, version string, IP range, HTML or Markdown document or agent-readiness file has to be parsed, built or checked exactly. Not for: parsing a URL query string (query-parse). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and destructiveHint=false, so statements like 'sin efectos secundarios' and 'determinista' mostly restate them. The description nonetheless adds genuinely non-annotated facts: hard limits of 64 KB input, 1 s per call and 1 MB output, plus the null-skipping behavior that changes the emitted string.

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

Conciseness3/5

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

The core behavior is front-loaded, but the text is presented twice (Spanish and English), with the English section ending in a meta-note pointing back to inputSchema.description, which is redundant. The long enumerative 'when' clause occupies significant space without adding routing value.

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?

With an output schema present and full schema coverage, the description needn't explain return values, and it does supply limits, determinism, side-effect profile and an explicit inverse-tool exclusion. What is missing is any indication of error behavior (e.g., what happens when input exceeds 64 KB or exceeds 1000 properties).

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%, so the baseline is 3, but the description goes beyond the schema by explaining the actual encoding consequences of the array_format choice (repeat vs brackets) and by documenting that nulls are skipped and nested objects use bracket notation — semantics the schema's terse field descriptions do not convey.

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+resource (serialize an object to an application/x-www-form-urlencoded query string) and immediately distinguishes itself from its inverse sibling by naming query-parse as the tool for parsing. The serialization details (arrays repeat keys or use brackets, nested objects use brackets, nulls skipped) make the scope unambiguous.

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?

Explicitly provides a 'Cuándo' clause and a 'No para' exclusion naming query-parse, which is exactly the routing information an agent needs. However, the 'when' list (URL, HTTP header, token, version string, IP range, HTML/Markdown document, agent-readiness file) reads as boilerplate shared across a parse/check tool family and is largely irrelevant to a query-string builder, which risks over-broadening perceived applicability.

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