Skip to main content
Glama

Leer Accept-Language

accept-language-parse
Read-onlyIdempotent

Analiza Accept-Language por prioridad q y, con idiomas soportados, elige la mejor coincidencia. 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 un bloque de encabezados HTTP crudos en un objeto con nombres en minúscula (http-headers-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: Parses an Accept-Language header into languages sorted by q-value and, given supported locales, picks the best match (exact, then by primary language). 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 raw HTTP header block (http-headers-parse). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
headerYesAccept-Language value (string; required; up to 4096 chars).
supportedNoSupported locales (array of string; optional; default []; up to 200 items).

Output Schema

NameRequiredDescriptionDefault
languagesNo
best_matchNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / header / examples
      Added value: +[
      +  "es-CO,es;q=0.9,en;q=0.8"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Parses an Accept-Language header into languages sorted by q-value and, given supported locales, picks the best match (exact, then by primary language). 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 raw HTTP header block (http-headers-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/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description still adds value beyond them: deterministic output for identical input, no network access, no stored state, and concrete limits (64 KB input, 1 s per call, 1 MB result). It does not describe the shape of the returned match, though 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 core sentences are front-loaded and efficient, but the definition is repeated three times (Spanish body, English body, and an identical inputSchema.description) plus a meta pointer '[EN completo / full EN: inputSchema.description]' that adds nothing. The generic artifact list in 'Cuando' is template filler that does not earn its place.

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 two-parameter, read-only parsing tool with an output schema, the description covers purpose, exclusion, determinism, resource limits and matching semantics. An agent has everything needed to select and call it correctly.

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 description coverage is 100%, so parameter types and bounds are already documented. The description nonetheless adds real semantics the schema lacks: that ordering follows q-value priority and that the matching against 'supported' is exact first, then by primary language — this tells the agent how the optional array actually affects the result.

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 names a specific verb and resource: parses an Accept-Language header, sorts by q-value, and picks the best match from supported locales, with the exact-then-primary fallback rule spelled out. It also names the sibling it is not (http-headers-parse). The value is slightly diluted by the boilerplate 'Cuando' list of unrelated artifacts (URL, IP range, HTML document) that applies to the whole suite rather than this tool.

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?

There is an explicit 'No para' clause naming http-headers-parse as the alternative for raw header blocks, which is real routing guidance. The positive 'Cuando' clause, however, is generic suite-wide boilerplate rather than conditions specific to this tool, so the agent gets one sharp exclusion but a fuzzy inclusion criterion.

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