Skip to main content
Glama

Resolver URL relativa

url-resolve
Read-onlyIdempotent

Resuelve una referencia relativa contra una URL base. 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: construir una URL desde una base, segmentos de ruta y parámetros de consulta (url-build). 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: Resolves a relative reference (../x, /y, ?q, //host/z) against a base URL per the WHATWG URL standard. 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: building a URL from a base, optional path segments (url-build). Side effects: none (read-only, no network access, no stored state). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
baseYesBase URL (string; required; up to 8192 chars).
referenceYesRelative or absolute reference (string; required; up to 8192 chars).

Output Schema

NameRequiredDescriptionDefault
urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / base / examples
      Added value: +[
      +  "https://example.com/a/b/c"
      +]
    • addedInput schema / properties / reference / examples
      Added value: +[
      +  "../d?x=1"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Resolves a relative reference (../x, /y, ?q, //host/z) against a base URL per the WHATWG URL standard. 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: building a URL from a base, optional path segments (url-build). 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/5.0
Behavior4/5

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

Annotations already declare read-only, non-destructive, idempotent and closed-world, so the safety profile is covered; the description still adds real value by stating no network access, no stored state, determinism, and concrete limits (64 KB input, 1 s per call, 1 MB result). The only gap is that it doesn't say what the resolved output looks like, but an output schema exists.

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 front-loaded definition is good, but the text is duplicated wholesale in Spanish and English and ends with a dangling pointer ('[EN completo / full EN: inputSchema.description]'), which is clutter. The generic 'Cuándo' enumeration also occupies space without earning it.

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, rich annotations, and fully documented parameters, the description supplies everything needed to invoke the tool correctly: the resolution model, the exclusion, the absence of side effects, and hard limits. Only the over-broad 'when' list risks sending the agent here for tasks the tool does not do.

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 100% and both parameters are documented with examples and length bounds, so the schema carries the load and a 3 is the baseline. The description contributes only the WHATWG standard reference and the reference-form examples (../x, /y, ?q, //host/z), which are modest additions over what the schema already shows.

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 — resolving a relative reference against a base URL — and names the standard (WHATWG URL). It explicitly contrasts with the sibling url-build, so an agent can distinguish the two without opening either schema.

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?

The 'No para' clause names the alternative (url-build) and the condition that selects it, which is exactly the routing signal an agent needs. The 'Cuándo' list, however, is boilerplate that sweeps in unrelated artifacts (IP ranges, tokens, HTML/Markdown documents, agent-readiness files), diluting rather than sharpening the guidance.

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