Skip to main content
Glama

Run an approved Request

execute_approved_request
Destructive

Execute an approved request by ID with optional parameters. Use list_approved_requests first to see available requests and required parameters. A request carries confirmation only when its published declaration can freeze a pending action. The declaration is the contract effect, the contract controls, whether the request allows modification, the count unit, and the write cap. The effect is the contract effect. An unrecognized or empty effect answers 409 policy_contract_unclassified on the Data API and policy_contract_unclassified on the MCP tool, and records no pending action. A contract control this deployment does not accept answers 409 policy_contract_unsupported on the Data API and policy_contract_unsupported on the MCP tool, and records no pending action. A count unit the write-cap check refuses answers 500 server_error on the Data API and write_cap_invalid on the MCP tool, and records no pending action. When modification is allowed, a recognized effect other than CREATE, UPDATE, DELETE, or UPSERT, or a data-changing effect with no positive cap, answers 403 write_cap_required on the Data API and write_cap_required on the MCP tool, and records no pending action. When modification is allowed, a disagreement between the two write caps answers 500 server_error on the Data API and write_cap_invalid on the MCP tool, and records no pending action. Write authority runs after that check. Its denial, including a data-changing effect or schema definition that does not allow modification and a statement shape the gate refuses, answers 403 query_not_authorized on the Data API and QUERY_NOT_AUTHORIZED on the MCP tool, and records no pending action. A block outcome answers 403 policy_contract_blocked and records no pending action only after those checks allow the call. A recognized read that does not allow modification answers 403 confirmation_policy_invalid and records no pending action; that effect is checked before the expiry. A data-changing effect that passed those checks and whose expiry_seconds is outside the range a pending action accepts answers 503 confirmation_policy_unavailable and records no pending action. Calling a request that carries confirmation records a pending action and answers confirmation_required until a person confirms it. A parameter, a policy read, or any other fact the listing does not carry can still refuse the call, and the listing does not predict it. A request with no confirmation policy carries no confirmation key. The approver Role, the confirmation app, and the prompt are not listed. When a confirmation link is available, that answer includes it in human_link; otherwise it names no place. Pass the listed id as query_id, or use id as a compatibility alias. Parameters are type-checked and validated before execution. Supplied statement parameters and subject-bound values of either kind are screened for SQL injection except declared json values, whose contents are schema-validated and bound as data; refusals are logged. Ordinary operation parameters are passed as named data without SQL injection screening. Rows are positional arrays in columns order. A request whose answer is one document answers with document — the source's own object, whole — instead of columns and rows, and cannot be mocked; list_approved_requests says which shape each request is, under result_shape. Pass json_pointers, a list of RFC 6901 JSON Pointers, to receive only those values from a document answer. A pointer that matches nothing is reported. A request that answers with rows is refused; use limit to bound rows. Pass format: "records" for one object per row. Record fields are emitted in columns order. Duplicate exact column names collapse to one column at the first position; the surviving value is unspecified. Set mock: true to receive generated placeholder values in the request's declared output shape without executing anything — useful for building against a request before it is approved or before its datasource is reachable. A mocked result is marked and proves nothing: it is not a test of the request, and its values are not data.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "execute_approved_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoAlias for query_id; accepts the listed id from list_approved_requests
mockNoExecute nothing and return generated placeholder values in the request's declared output shape. Any parameter values are accepted. The response is marked as mocked and must never be reported as evidence that the request works.
limitNoMax rows to return (default: 100, max: 1000)
formatNoRow format: compact positional arrays (default), or records with one object per rowcompact
subjectNoThe end tenant this call is for. Only an access point whose administrator configured the request source may pass it; from anyone else it is refused. It is never one of the parameters: it decides which tenant's rows the approved request may see, and the access point states it on behalf of its own user.
query_idNoThe ID of the approved request to execute (from list_approved_requests)
parametersNoParameter values as key-value pairs matching the request's parameter definitions
json_pointersNoOptional RFC 6901 JSON Pointers. After a document answer is produced, the response carries only the selected values. Omit the field and the document is unchanged. A pointer that matches nothing is listed, not dropped. At most 32 pointers, each at most 512 UTF-8 bytes. Rows are refused; use limit to bound rows.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Goes well beyond the annotations (destructiveHint=true, idempotentHint=false) by disclosing the confirmation lifecycle: it records a pending action and returns `confirmation_required` until a person confirms, with `human_link` supplied only when available. It also discloses error outcomes (409 policy_contract_unclassified/unsupported, 403 write_cap_required/query_not_authorized/policy_contract_blocked, 503 confirmation_policy_unavailable) and the fact that refusals record no pending action. Points lost because the prose is so tangled that several behaviors (e.g. re-execution semantics, "A request that answers with rows is refused") are hard to extract reliably.

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

Conciseness2/5

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

A single dense paragraph of roughly a thousand words, with the actual invocation guidance buried among long duplicated Data-API/MCP error-code pairings that an agent executing this tool cannot act on. The front-loaded purpose sentence is good, but the middle is circular ("The declaration is the contract effect, the contract controls... The effect is the contract effect") and the mock paragraph repeats the schema.

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 carries the burden of explaining returns and does so: positional arrays in `columns` order, the `document` shape, `json_pointers` projection, records format, duplicate-column collapse, and how mocked results are marked. The confirmation flow and failure modes are covered. Some gaps remain around idempotency and re-invocation, which matter for a destructive, non-idempotent tool.

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?

Schema coverage is already 100%, so the baseline is 3, but the description genuinely adds meaning: `id` as a compatibility alias for query_id, `json_pointers` selecting values from a document answer with non-matching pointers reported rather than dropped, `format: "records"` for one object per row, and `limit` for bounding rows. It is weaker on `subject` and `parameters`, which are explained better in the schema than in the description.

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?

Opens with a specific verb+resource: "Execute an approved request by ID with optional parameters." It names list_approved_requests as the discovery path, which helps separate it from the sibling tools. It does not, however, distinguish itself from the plain `execute` or `dry_run_project_database_migration` siblings, so an agent still has to infer which executor applies.

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?

Gives a concrete prerequisite ("Use list_approved_requests first to see available requests and required parameters") and a clear non-production use case (mock: true "for building against a request before it is approved or before its datasource is reachable"). No explicit when-not-to-use or sibling-vs-sibling routing guidance, but the context conditions are stated.

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