Skip to main content
Glama

Cooper Email

Revoke a connected app

cooper_revoke_oauth_grant
DestructiveIdempotent

Use this when an OAuth app should lose access to this account. Requires auth. Destructive. Inputs: client_id (required; the OAuth client id from cooper_list_oauth_grants). Deletes every access and refresh token for that client on this account, and every unused authorization code for that client, in one transaction. The client registration stays, so the app can connect again. Returns {object:"oauth_grant", id, revoked:true, tokens_revoked}. tokens_revoked is how many token rows were removed. Those access tokens then return 401, and their refresh tokens fail at /oauth/token. Other apps and API keys keep working. An unknown client, or a client that belongs to another account, returns 404 oauth_grant_not_found. An inbox-scoped key receives 403 permission_denied. A key without key_write receives 403 permission_denied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
client_idYesOAuth client id from cooper_list_oauth_grants. This is the grant id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructive=true and idempotent=true, but the description adds substantial detail beyond them: tokens and unused authorization codes are deleted in one transaction, the registration remains, and the return payload includes tokens_revoked. It also discloses downstream effects (401s, refresh failures at /oauth/token) and that other apps/keys are unaffected.

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 use condition, then inputs, behavior, return shape, and error cases in a logical order. It is dense and slightly long, and 'Destructive' duplicates the annotation, but nearly every sentence carries actionable information.

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?

With no output schema, the description fully carries the burden: it specifies the response object fields (oauth_grant, id, revoked, tokens_revoked) and the failure modes (404 oauth_grant_not_found, 403 permission_denied for inbox-scoped or key_write-less keys). Nothing needed to call it correctly is missing.

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% and the single client_id parameter is fully documented in the schema, including its source and that it is the grant id. The description repeats that source hint, adding little beyond what the schema already provides, so the baseline of 3 applies.

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+resource ('an OAuth app should lose access to this account') and the title 'Revoke a connected app' confirms it. It clearly distinguishes itself from the sibling cooper_list_oauth_grants, which is cited only as the source of the client_id.

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?

Gives an explicit trigger ('when an OAuth app should lose access to this account') and names the sibling used to obtain the required client_id. It also clarifies the boundary of the action by noting the client registration survives, so an agent knows this is scoped to tokens/codes, not app deletion.

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.