Skip to main content
Glama

envelope_apply

Check an operator-granted permission before acting: verify it is active and covers the requested action, then log usage in audit ledger. Refuse with reason if missing, expired, or out of scope.

Instructions

Check an authority envelope — an operator-granted, scoped permission — BEFORE acting under it: verifies envelope_id is active and covers verb with the given call_args, then appends a citation to the FRANK ledger recording the use against project/session. Refuses with the reason when the grant is missing, expired, or out of scope.

#333 double-charging note: verb in VERB_LEVEL_ENFORCED_VERBS (currently just "dispatch") now cites itself from inside its own tool handler (dispatch_send) — that handler is authoritative for the act. Calling envelope_apply first for one of those verbs and then performing the act would charge the grant's quota twice for one real act, so for those verbs this tool is advisory-only: it still runs the full check() (so a caller can preflight "would this be granted?" without side effects) but does NOT write a citation — cited_before_act comes back False and note says so. The verb handler cites exactly once, at the act, regardless of whether envelope_apply was called first. Every other verb is unchanged: still checks AND cites here, since no other verb has a handler-side citation path yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
verbYes
app_idYes
projectYes
sessionYes
call_argsYes
envelope_idYes
Behavior5/5

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

The description discloses all side effects: it verifies and then appends a citation. It explicitly states that for dispatch verbs it does NOT write a citation and returns cited_before_act=False with a note. It explains refusal behavior (returns reason if missing/expired/out of scope). This far exceeds what annotations provide (annotations only indicate non-read-only, non-destructive) and adds crucial nuance about the double-charging issue.

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

Conciseness3/5

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

The description is lengthy and contains a dense technical note about double-charging. While the main purpose is front-loaded in the first sentence, the #333 note is a large block of text that could be structured more clearly (e.g., bullet points). It is not overly verbose for the complexity, but it is not concise; a structured breakdown would improve scannability.

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?

The description covers the main functionality, the special handling for dispatch verbs, and failure behavior. It hints at the return structure (cited_before_act, note) but does not fully specify the output format or all possible error types. For a tool with no output schema, this is a reasonable level of detail; it provides enough to call the tool correctly, though a return format specification would make it more complete.

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 description coverage is 0%, so the description must compensate. It explains the roles of envelope_id, verb, call_args, project, and session (they are used for verification and citation recording). However, app_id is not explained at all, and call_args is only vaguely described as 'given call_args' without structure. While most parameters are given meaning, the gap on app_id prevents a higher score; a 4 is appropriate given the low schema coverage.

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?

The description clearly states the tool's function: it checks an authority envelope before acting, verifies the envelope covers the verb and arguments, and appends a citation to the FRANK ledger. It also introduces the advisory-only distinction for certain verbs, which separates it from generic append tools like frank_append. The verb+resource is specific and unambiguous.

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?

Explicitly states when to use the tool: 'BEFORE acting under it.' It clearly explains the exceptional case for VERB_LEVEL_ENFORCED_VERBS (dispatch) where the tool becomes advisory-only and cites are handled by dispatch_send, preventing double-charging. This gives strong guidance on when to rely on it and when not to, including practical use for preflight checks.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/willow-memory/willow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server