Skip to main content
Glama

Gateway: protect and meter an MCP server

gateway_create

Put your MCP server behind Privi. You get an HTTP URL and a WebSocket URL that forward to it unchanged (x402 payments keep working) while Privi rate-limits callers, optionally requires a Privi Passport, meters every tool call and writes each call to your tamper-evident log. The kill switch stops the gateway instantly. Upstream must be public HTTPS. Requires the organization API key.

Input Schema

NameRequiredDescriptionDefault
nameYesA name for this gateway, e.g. 'acme-search-mcp'
guardNoPrivi Guard on every tool result: off, tag (add the verdict in _meta) or block (withhold injected results). Each check uses your Guard allowance or creditsoff
min_scoreNo0 = open to everyone. >0 = callers must prove a KYA wallet whose Passport scores at least this (0-1000)
rate_per_minNoRequests per minute per caller (1-1200)
upstream_urlYesThe MCP server's public https URL (streamable HTTP), e.g. https://api.acme.com/mcp

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Annotations declare a non-read-only, non-destructive, non-idempotent mutation, and the description adds substantial context beyond them: the kill switch behavior, tamper-evident call logging, rate-limiting, optional Passport gating, the public-HTTPS upstream constraint, and the org-API-key auth requirement. This is rich disclosure of effects and prerequisites for a mutation tool.

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

Conciseness4/5

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

Front-loaded with the core action, then the value proposition, then prerequisites; nearly every sentence carries information. It is dense but slightly overstuffed, stacking many features into one long second sentence.

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 no output schema, the description compensates by describing what is returned (HTTP and WebSocket URLs) and by covering auth, constraints, and side effects. It stops short of explaining how the guard/min_score/rate options interact, but an agent has enough to invoke correctly.

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 each of the five params (name, guard, min_score, rate_per_min, upstream_url) is already fully documented in the schema. The description adds no parameter-level meaning beyond a general reference to 'rate-limits callers,' so the baseline 3 applies.

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?

States a specific verb and resource: 'Put your MCP server behind Privi,' and elaborates the concrete artifacts produced (HTTP + WebSocket URLs) plus the value-add (rate-limiting, metering, logging). It is clearly a creation tool, though it never names the sibling it differs from (e.g. gateway_delete, gateway_set_guard, gateway_info), leaving differentiation to the obvious name prefix.

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?

Usage is implied by the create framing and by the stated prerequisites ('Upstream must be public HTTPS. Requires the organization API key'), but there is no explicit when-to-use versus when-not guidance or reference to gateway_set_guard/gateway_delete for subsequent lifecycle changes.

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