Skip to main content
Glama

Cabecera de autenticación Basic

basic-auth-header
Read-onlyIdempotent

Construye el encabezado Authorization Basic (RFC 7617). Es solo base64, no cifrado; requiere HTTPS para la confidencialidad. 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: firmar un JWT con un secreto HMAC (jwt-sign-hmac). 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 an HTTP Basic Authorization header value from a username and password (RFC 7617, UTF-8). Basic auth is only base64, not encryption; it needs HTTPS for confidentiality. 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: signing a JWT with an HMAC secret (jwt-sign-hmac). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
passwordYesPassword (string; required; up to 1024 chars).
usernameYesUsername (no colon) (string; required; up to 1024 chars; pattern ^[^:]*$).

Output Schema

NameRequiredDescriptionDefault
headerNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / password / examples
      Added value: +[
      +  "open sesame"
      +]
    • addedInput schema / properties / username / examples
      Added value: +[
      +  "Aladdin"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Builds an HTTP Basic Authorization header value from a username and password (RFC 7617, UTF-8). Basic auth is only base64, not encryption; it needs HTTPS for confidentiality. 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: signing a JWT with an HMAC secret (jwt-sign-hmac). 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

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the description's 'no side effects, deterministic' lines largely restate them. It does add genuinely new behavioral context: the security caveat that Basic auth is base64, not encryption, and requires HTTPS, plus concrete limits (64 KB input, 1 s per call, 1 MB result). Those additions are real but modest for a pure-function tool.

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?

Purpose is front-loaded and the security caveat is well placed, but the entire body is duplicated in Spanish and English, roughly doubling length for zero added information. The trailing '[EN completo / full EN: inputSchema.description]' pointer is noise that points at text the agent already has.

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?

An output schema exists, so return values need not be explained, and both params are covered by the schema. Purpose, security posture, determinism, and resource limits are all stated, which is ample for a two-string pure function. The remaining gap is that the 'When' section is generic boilerplate rather than describing real usage scenarios.

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%, so both parameters are fully documented and the no-colon username constraint lives in the pattern. The description adds the RFC 7617/UTF-8 framing, which affects how the output is encoded, but no additional per-parameter meaning. Baseline 3 applies when the schema does the heavy lifting.

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?

Names a specific verb and resource — 'Builds an HTTP Basic Authorization header value from a username and password (RFC 7617, UTF-8)' — so an agent knows exactly what it produces. Sibling differentiation is thin: the only named alternative is jwt-sign-hmac, which is far from the nearest neighbors (base64-encode, url-build), and the 'When' clause lists unrelated resources.

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 'When:' clause is boilerplate that does not describe this tool's use case — it talks about parsing URLs, IP ranges, and HTML/Markdown documents, which this tool does not do. The only real routing signal is 'Not for: signing a JWT with an HMAC secret (jwt-sign-hmac)', which is accurate but points at a distant sibling. An agent gets no guidance on when a Basic header is the right thing versus e.g. base64-encode.

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