Skip to main content
Glama

Bind a secret to a scope

attach_secret
DestructiveIdempotent

Bind a secret to a scope so runs there see it as an env var. Server-wide when only server_id is given; project-scoped when project_id is also given. Pass value to set-and-bind in one call; omit it to bind an existing secret by key. A key has one value on the account, shared everywhere it is bound: passing value here changes it for every server and project that key is bound to. Give a project that needs its own value a key of its own.

Input Schema

NameRequiredDescriptionDefault
keyYesEnv var name of the secret to bind. With value, the secret is created or changed in the same call.
valueNoOptional: set the value while binding. Write-only.
server_idYesThe server's id, as returned by create_server or list_servers.
project_idNoOptional. Bind to just this project instead of server-wide.

Output Schema

NameRequiredDescriptionDefault
idYesSecret id. Pass it to delete_secret.
keyYesEnv var name.
maskedNoA masked hint of the value. The value itself is never returned.
created_atNoISO 8601 timestamp.
server_idsNoServers it is bound to.
updated_atNoISO 8601 timestamp.
descriptionNoNote about what it is for.
project_idsNoProjects it is bound to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description adds important behavior beyond the annotations: a key has one account-wide value shared across every server and project where it is bound, and passing value changes it everywhere. It also warns that a project needing its own value requires a separate key, which is exactly the kind of consequence an agent needs before invoking a destructiveHint=true tool.

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 four tight sentences with the primary action and scoping rules front-loaded. Every sentence adds distinct, necessary information, especially the account-wide value warning.

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?

Given full schema coverage, an output schema, and annotations covering mutation/idempotency, the description supplies the missing conceptual model: binding scope, set-versus-bind behavior, and the shared account-wide value semantics. Nothing material for correct invocation appears to be missing.

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 100%, so the baseline is 3, but the description adds semantic context not obvious from the schema: value is not scoped to the single binding but mutates the account-wide key value everywhere it is bound. It also clarifies the server_id/project_id scoping relationship.

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 uses a specific verb+resource ('Bind a secret to a scope') and immediately explains the resulting behavior ('runs there see it as an env var'), distinguishing server-wide from project-scoped binding. It also distinguishes binding-only from set-and-bind in one call, making the tool's role clear.

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 explicit conditions for the two invocation modes: server-wide when only server_id is supplied, project-scoped when project_id is also supplied, and set-and-bind when value is passed versus binding an existing key when omitted. It does not name sibling alternatives such as set_secret, so it stops short of full when/when-not guidance.

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.