Skip to main content
Glama

Grant one agent run

gate_create_run

Gate Actions: give one agent session narrow, expiring permission. Actions are rules with {placeholders} bound by scope (e.g. "PATCH /customers/{customer}/tickets/:id" with scope {"customer":"A"}), each with an optional max and approval. Add a human approver with gate_add_approver before granting approval:true actions; without an active approver the grant is refused. Returns a run token (shown once) the agent sends as x-odile-run with its app key. Writes in a run need an Idempotency-Key. Give a write a check ("GET /bookings?idempotency_key={key}") and the agent can settle a lost answer with POST /g//_gate/recover.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>",
      "admin_key": "<admin_key>",
      "app": "<app>",
      "actions": "<actions>"
    },
    "name": "gate_create_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesThe app id (app_...) this run is for
labelNoOptional: what the run is for, e.g. "triage ticket 4411"
scopeNoValues for the {placeholders}, e.g. {"customer":"A"}
actionsYesRules, or {rule, max, approval, check}
admin_keyYesThe project admin key (ga_...). Read it from the .env; never print it.
max_callsNoOptional: calls allowed in the whole run
project_idYesThe project id from gate_create_project, e.g. p1a2b3...
ttl_secondsNoHow long the run lasts (default 3600)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / actions / description
      Previous value: -"Rules, or {rule, max, approval}"New value: +"Rules, or {rule, max, approval, check}"
    • changedInput schema / properties / actions / items / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "approval": {
      -        "type": "boolean"
      -      },
      -      "max": {
      -        "minimum": 1,
      -        "type": "integer"
      -      },
      -      "rule": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "rule"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "approval": {
      +        "type": "boolean"
      +      },
      +      "check": {
      +        "description": "For a write: the GET that finds it by key, e.g. \"GET /customers/{customer}/bookings?idempotency_key={key}\"; it must also be a GET action of the run",
      +        "type": "string"
      +      },
      +      "idempotent": {
      +        "description": "With check: the API dedupes on Idempotency-Key, so a not-found write may be retried",
      +        "type": "boolean"
      +      },
      +      "max": {
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "rule": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "rule"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavior: the run token is shown once, it is sent as x-odile-run with the app key, writes require an Idempotency-Key, and approval-gated actions are refused without an active approver. It also explains the check/recover mechanism for writes, which is valuable operational context.

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?

The description is appropriately sized for a complex run-creation tool and front-loads the core purpose. However, it is a dense single paragraph with several advanced concepts, so it could be structured more clearly for an agent parsing it.

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?

Given the tool's complexity, rich schema, and annotations, the description is largely complete: it covers token handling, approver prerequisites, idempotency, and recovery. It still leaves some context implicit, such as the relationship to sibling run-management tools and the precise refusal/output behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents all parameters at 100% coverage, so the baseline is 3. The description adds conceptual meaning by explaining that actions are placeholder-bound rules with optional max and approval, and by describing how checks work for writes.

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 clearly states that the tool grants one agent session a narrow, expiring permission and returns a run token. It names gate_add_approver as a prerequisite, but does not explicitly differentiate this tool from other run-related siblings such as gate_delegate_run.

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

Usage Guidelines4/5

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

It gives clear usage context: add an approver before granting approval:true actions, and writes need an Idempotency-Key plus a check to support recovery. It does not provide explicit when-not-to-use guidance or compare this tool against alternative siblings.

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