Skip to main content
Glama

gateway_admin_grant_scope

Grant or deny a Gateway access scope by specifying subject type, key, and scope name. Use dry-run mode to preview changes before applying, with optional reason and expiration.

Instructions

Grant or deny a Gateway scope through Postgres. Requires access:admin; dry_run defaults to true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
effectNoallow
reasonNo
dry_runNo
ttl_daysNo
scope_nameYes
subject_keyYes
subject_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

The description discloses the critical behavioral trait that dry_run defaults to true, which is essential safety information for an agent invoking a mutation tool. It also states the required admin permission, which is behavioral context beyond what annotations provide. The annotations only include a title, so the description carries the full burden and does well by surfacing the dry-run safety default and the Postgres implementation detail.

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?

The description is a single sentence that packs the verb, resource, implementation detail, permission requirement, and safety default into 14 words. Every element earns its place, and the most critical safety information (dry_run default) is front-loaded at the end of the sentence where it's still immediately visible.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the essential safety and permission context, and an output schema exists which reduces the need to explain return values. However, with 7 parameters and 0% schema description coverage, the description doesn't fully explain the parameter semantics (especially subject_type, subject_key, ttl_days, and reason). The tool is moderately complex as an admin mutation with multiple optional parameters, so more parameter guidance would be needed for full completeness.

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 0%, so the description must compensate for undocumented parameters. The description mentions 'Grant or deny' which maps to the 'effect' parameter (allow/deny), and 'scope' maps to scope_name, but it doesn't explain subject_type, subject_key, ttl_days, reason, or dry_run semantics beyond the default. With 7 parameters and zero schema descriptions, the description only partially compensates for the gap.

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 description states a specific verb ('Grant or deny') and resource ('a Gateway scope through Postgres'), which clearly identifies the operation. It distinguishes from siblings like gateway_admin_revoke_scope by covering both grant and deny in one tool, though it doesn't explicitly name the sibling. The 'through Postgres' detail adds implementation context that helps differentiate from other admin tools.

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?

The description implies usage context by mentioning the required 'access:admin' permission and the dry_run default, which signals this is an admin-only operation with safety defaults. However, it doesn't explicitly state when to use this tool versus alternatives like gateway_admin_revoke_scope or gateway_admin_grant_resource, nor does it explain when a deny effect would be preferred over using the revoke tool.

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

Deploy Server

Other Tools