Skip to main content
Glama
Magic Lane MCP DevKit Server

Magic Lane MCP DevKit Server

Official
by magiclane

Get API Key

get_api_key
DestructiveIdempotent

Retrieve an API key's details—name, expiry, status, last four characters—masked by default, and optionally reveal it or write the full key to a file for the user.

Instructions

Read one API key of a project, enabled or disabled: name, expiry, active, last 4 characters. The key is masked unless revealToken is true; set that only when the user asks to see the key. To hand the key to the user without showing it here, give tokenPath and it is written to that file (a new file; an existing one is replaced only with overwrite: true). Requires "API keys: Read".

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": {
      "projectId": "<projectId>",
      "keyId": "<keyId>"
    },
    "name": "get_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyIdYesAPI key id, from list_api_keys or create_api_key (the "id" field, not the key itself).
overwriteNoReplace the file at tokenPath if it exists. Default false: an existing file is refused. Set it only when the user wants that file replaced.
projectIdYesProject id (UUID), from list_projects or create_project.
tokenPathNoWrite the full API key to this file (absolute, or relative to the folder MAGICLANE_FILES_DIR names when the server has one, otherwise the server's working directory), created readable only by the user where the system supports it. An existing file is replaced only with overwrite: true, and a network path is refused. A path that starts with ~/ or ~user/ is refused: ~ is not read as a home folder. The key itself is not put in the result.
revealTokenNoReturn the full API key in the result. Default false: the key is masked (only its last 4 characters). Set true only when the user asks to see the key; prefer tokenPath when it is available.

Output Schema

NameRequiredDescriptionDefault
keyYesThe API key, masked unless the full key was asked for.
notesYesThings to know about this result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

With destructiveHint=true and readOnlyHint=false supplied, the description earns credit by explaining why: it writes the key to a new file, refuses to replace an existing file unless overwrite:true, and refuses network paths and ~/-prefixed paths. It also discloses default masking (last 4 chars only) and the required "API keys: Read" permission, which annotations alone cannot convey.

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?

Three sentences, front-loaded with the read scope before the side-effect mechanics, and no filler. It is dense with nested parentheticals ("a new file; an existing one is replaced only with overwrite: true"), which slightly hurts scannability but each clause carries real behavioral payload.

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?

For a secret-returning tool with a file-write side effect, the definition covers masking, opt-in reveal, file semantics, overwrite refusal, path restrictions, and the permission prerequisite. An output schema exists, so return shape need not be explained, and nothing an agent needs to call this safely is missing.

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?

Schema description coverage is 100%, and the schema already carries the instructions for revealToken ("Set true only when the user asks... prefer tokenPath") and overwrite; the description largely restates those. It adds the sequencing hint "to hand the key to the user without showing it here, give tokenPath", which is mildly useful, but the parameter contract is already fully documented upstream.

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?

States a specific verb and resource ("Read one API key of a project, enabled or disabled") and enumerates exactly what is returned: name, expiry, active, last 4 characters. The singular "one API key" plus the required keyId implicitly separates it from list_api_keys, so an agent can distinguish scope without opening the schema.

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 explicit when-to-use conditions for the two risky options: revealToken "only when the user asks to see the key" and tokenPath for handing the key over "without showing it here", with overwrite gated on the user wanting replacement. It stops short of naming the alternative tool (list_api_keys) for multi-key retrieval, so the routing is implied rather than spelled out.

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