Skip to main content
Glama

diadoc_set_key

Idempotent

Rotate an expired or leaked Diadoc API key directly from chat. Confirm that the key will enter the chat transcript to proceed, then the new key is validated against the marketplace and saved locally with restricted permissions.

Instructions

Change / rotate the API key from chat (e.g. the old one expired or leaked).

⚠️ The key goes into the chat transcript — requires i_understand_key_goes_to_chat=true. The safe, terminal-free alternative is the installer, where the key never enters chat. Use a scoped key and rotate it in the seller cabinet if it was exposed.

Args: credentials: dict with the required fields ({fields}). cabinet: which cabinet to update. Default: the active one (so "my key expired" just works). If there is none, the cabinet is named from the marketplace's shop name, else "main". i_understand_key_goes_to_chat: must be true to proceed. On success the key is validated against the marketplace and the shop name is reported. Saved locally (chmod 600), never echoed back.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cabinetNo
credentialsYes
i_understand_key_goes_to_chatNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already mark the tool as not read-only and idempotent, so the description's main added value is in security and file-handling context. It warns that the key goes into the chat transcript, states the key is saved locally with chmod 600, never echoed back, and is validated against the marketplace. This goes meaningfully beyond the annotations without contradicting them.

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 well-structured and front-loaded with the core purpose. It uses a warning, a compact argument list, and a clear behavioral note about validation and saving. The minor repetition of the `i_understand_key_goes_to_chat` requirement in both the warning and the Args list is not harmful, and the unresolved `{fields}` placeholder is the only notable defect.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool involving credentials, the description covers the safety aspects and cabinet selection, but the credentials shape remains underspecified. The output schema exists, so the caller can learn about the response, yet the required input fields inside the credentials object are still a notable unknown. Given the complexity and the sensitive nature, this is not fully complete.

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?

The schema provides no descriptions (0% coverage), so the description must compensate. It does explain `cabinet` substantially and the requirement for `i_understand_key_goes_to_chat`, but the `credentials` parameter is only described as a dict with required fields, and the placeholder `{fields}` is not resolved. An agent still cannot tell exactly which fields are required in `credentials`, making this only partially successful.

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 immediately states that the tool changes or rotates the API key for a cabinet, with explicit use cases like an expired or leaked key. This clearly distinguishes it from siblings like diadoc_list_cabinets or diadoc_call_method, which either inspect or call other methods. The action and target resource are 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?

It explicitly says when to use the tool: when the old key has expired or leaked and must be changed from chat. It also names a safer alternative, the installer where the key never enters chat, and instructs to use a scoped key and rotate it in the seller cabinet if exposed. This gives the agent clear decision guidance against alternatives.

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