Skip to main content
Glama
Iqram09

kong-ai-gateway-mcp

by Iqram09

Explain an authentication or authorization failure

explain_auth_failure
Read-onlyIdempotent

Trace 401/403 authentication and authorization failures through Kong routes, plugins, consumers, and ACLs to pinpoint the exact configuration step rejecting credentials.

Instructions

Focused analysis of why requests to a route are being rejected, narrowed to the authentication and authorization chain.

USE WHEN: the reported symptom is specifically a 401 or 403, or the user says credentials are being rejected. For a broader or vaguer problem, use diagnose_route.

Walks the chain in the order Kong evaluates it and reports where it breaks:

  1. does a route serve this path?

  2. is an authentication plugin attached, and is it ENABLED?

  3. does the named consumer exist?

  4. does that consumer hold a credential of the required type? -> 401 if not

  5. does an acl plugin apply, and is the consumer in an allowed group? -> 403 if not

RETURNS: chain with a per-step verdict, plus the authentication and authorization findings and a likelyCause.

LIMITATIONS: reasons from configuration, not from observed traffic. It cannot tell you whether a client is sending a malformed header or an expired token -- only what the gateway is configured to require.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoURL path, e.g. "/payments".
routeNoRoute name or `route:<name>` reference.
consumerNoUsername of the client that is failing to authenticate, if known.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses the evaluation order Kong walks, the exact failure-to-status mapping (401 vs 403 per step), and a clear LIMITATIONS section stating it reasons from configuration rather than observed traffic.

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

Conciseness5/5

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

Front-loaded purpose, labeled USE WHEN, RETURN, and LIMITATIONS sections, and a numbered chain where every line conveys a distinct decision rule. Dense but zero waste.

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?

No output schema exists, yet the RETURNS paragraph names the key fields (chain, findings, likelyCause), and the limitations cover what the tool cannot do. All parameters are optional and no prerequisite is omitted.

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 the three parameters are already documented in the schema itself; the description implies their roles through the chain but adds no syntax or format detail, warranting the baseline 3.

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 ('explain') and resource ('authentication or authorization failure'), and immediately narrows scope to the auth chain, explicitly distinguishing itself from the broader diagnose_route sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The USE WHEN block names the exact selecting symptoms (401 or 403, rejected credentials) and names the alternative (diagnose_route) for vaguer problems, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.