Skip to main content
Glama
RawTree MCP Server

RawTree MCP Server

Official
by rawtreedb

Create API Key

create-api-key

Creates a cluster-scoped RawTree API key with selected permissions and optional expiry, returning the one-time credential for CI, agents, connectors, or scripts.

Instructions

Purpose: Create a new RawTree API key for a cluster.

NOT for: User login. Use RawTree auth/CLI or the dashboard for that workflow.

Returns: The new API key value and expires_at (UTC timestamp or null for never). The API key is only shown once, so you MUST display it to the user.

Auth: Uses POST /v1/api-keys and requires admin permission for database API key auth.

When to use:

  • User needs a key for CI, an agent, a connector, or a script

  • User wants a read-only, write-only, read-write, or admin credential

  • User asks to rotate credentials by creating a replacement before revoking the old key

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": {
      "name": "<name>"
    },
    "name": "create-api-key"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesHuman-readable API key name.
clusterNoName or ID of the cluster to use for this operation.
databaseNoOptional default database for the new key. RawTree uses the default database when omitted.
expires_atNoOptional expiration as a future RFC 3339 timestamp with a timezone. The API validates and normalizes it to UTC. Omit or use null to never expire. Expiration cannot be updated; create a replacement key to change it.
permissionNoPermission level. Prefer read_only for query-only agents and write_only for ingest-only connectors.read_write
organizationNoName or ID of the organization containing the target cluster.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.10
    • changedInput schema / properties / cluster / description
      Previous value: -"RawTree cluster to use for this operation."New value: +"Name or ID of the cluster to use for this operation."
    • changedInput schema / properties / organization / description
      Previous value: -"RawTree organization containing the target cluster."New value: +"Name or ID of the organization containing the target cluster."
  2. Changed1 schema field changedv0.4.2
    • addedInput schema / properties / expires_at
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Optional expiration as a future RFC 3339 timestamp with a timezone. The API validates and normalizes it to UTC. Omit or use null to never expire. Expiration cannot be updated; create a replacement key to change it."
      +}
  3. Changed4 schema fields changedv0.3.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / cluster
      Added value: +{
      +  "description": "RawTree cluster to use for this operation.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / database
      Added value: +{
      +  "description": "Optional default database for the new key. RawTree uses the default database when omitted.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / organization
      Added value: +{
      +  "description": "RawTree organization containing the target cluster.",
      +  "minLength": 1,
      +  "type": "string"
      +}
  4. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full disclosure burden and does so: it states the key value is shown only once and must be displayed to the user, names the underlying endpoint (POST /v1/api-keys), discloses the admin-permission requirement, and warns that expiration cannot be changed after creation.

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?

Markdown sectioning (Purpose / NOT for / Returns / Auth / When to use) front-loads the identity of the tool and keeps each block short. There is mild redundancy between the "Returns" warning and the rotation bullet, but nothing that obscures the call path.

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 six-parameter mutation tool with no annotations and no output schema, the description supplies everything an agent needs: the operation's result shape and one-time visibility, the auth prerequisite, and the immutability constraint on expiration.

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%, so the baseline is 3; the schema already explains name, cluster, database, expires_at format, and the permission enum with its default. The description reinforces the permission levels and the immutability of expires_at, but adds no new meaning for cluster/database/organization parameters beyond what is already documented.

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 opens with a specific verb+resource ("Create a new RawTree API key for a cluster") and immediately scopes what it is not ("NOT for: User login"). Combined with the sibling names delete-api-key and list-api-keys, an agent can unambiguously pick the right tool.

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 gives an explicit "When to use" list (CI, agent, connector, script; specific permission levels; rotation by creating a replacement) and an explicit exclusion with the alternative path (RawTree auth/CLI or the dashboard for user login). Both when and when-not are covered.

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