Skip to main content
Glama

Construir URL

url-build
Read-onlyIdempotent

Construye una URL desde una base, segmentos de ruta y parámetros de consulta. 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: analizar una URL absoluta (url-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: Builds a URL from a base, optional path segments (each percent-encoded) and query parameters (arrays repeat the key), with an optional fragment. 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 an absolute URL with the WHATWG URL parser into scheme, host, port (url-parse). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
baseYesBase URL (string; required; up to 8192 chars).
queryNoQuery parameters (object; optional; default {}).
fragmentNoFragment (string; optional; up to 1000 chars).
path_segmentsNoPath segments to append (array of string; optional; default []; up to 100 items).

Output Schema

NameRequiredDescriptionDefault
urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / base / examples
      Added value: +[
      +  "https://api.example.com/v1/"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Builds a URL from a base, optional path segments (each percent-encoded) and query parameters (arrays repeat the key), with an optional fragment. 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 an absolute URL with the WHATWG URL parser into scheme, host, port (url-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

A3.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent and closed-world, but the description adds concrete operational limits absent from the structured data: 64 KB JSON input, 1 s per call, 1 MB result, plus an explicit determinism guarantee. No contradiction with annotations, though 'sin red / sin estado' partly restates readOnlyHint and openWorldHint.

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

Conciseness2/5

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

The text is duplicated wholesale in Spanish and English, and the English copy is truncated into a self-reference ('[EN completo / full EN: inputSchema.description]'). Half of each version is an irrelevant task enumeration (headers, tokens, IP ranges, HTML documents) that does not pertain to URL construction, so much of the length does not earn its place.

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?

All four parameters are covered by schema, an output schema exists so return values need no explanation, and the description supplies limits, determinism and one exclusion. The only substantive gap is sibling routing against url-resolve and query-build, which are the nearest alternatives.

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?

With 100% schema coverage the baseline is 3, and the description earns extra by explaining encoding semantics the schema does not: each path segment is percent-encoded, and array-valued query parameters repeat the key. That is real behavioral meaning beyond the property descriptions.

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 opening sentence gives a specific verb and resource with its inputs ('Construye una URL desde una base, segmentos de ruta y parámetros de consulta'), which clearly separates it from url-parse. However, the 'Cuándo' clause then claims relevance to HTTP headers, tokens, IP ranges, HTML/Markdown documents and agent-readiness files — none of which a URL builder handles — muddying what the tool actually does.

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?

There is an explicit exclusion ('No para: analizar una URL absoluta (url-parse)'), which is good routing. But the closest siblings, url-resolve (relative resolution) and query-build (query-string construction), are never named, and the positive 'when' guidance is largely irrelevant boilerplate rather than a condition that selects 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