Skip to main content
Glama
grandMA2 MCP
by drohi-r

promote_session_to_skill

Promotes a completed agent session into a named, versioned skill stored in the registry with a quality score; destructive-scope skills require operator approval before use.

Instructions

    Promote a completed agent session to a named, versioned Skill.

    The skill is stored in the registry with a quality score derived
    from the session's step success ratio.

    Safety rule: if ``safety_scope`` is ``DESTRUCTIVE``, the skill is
    created with ``approved=False`` and cannot be used until an operator
    calls ``approve_skill`` (requires SYSTEM_ADMIN scope).

    Args:
        session_id:        ID of the session to promote (8-char prefix or full UUID).
        name:              Short human name for the skill (e.g. "blue_wash_look").
        description:       One-line purpose statement.
        body:              Markdown playbook — steps, caveats, example inputs.
        safety_scope:      "SAFE_READ" | "SAFE_WRITE" | "DESTRUCTIVE"  (default SAFE_WRITE).
        applicable_context: Free-text retrieval hint (e.g. "color wash cue storage").
    

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": {
      "session_id": "<session_id>",
      "name": "<name>",
      "description": "<description>",
      "body": "<body>"
    },
    "name": "promote_session_to_skill"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYes
nameYes
session_idYes
descriptionYes
safety_scopeNoSAFE_WRITE
applicable_contextNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the registry write, the derived quality score, and the critical safety gate where DESTRUCTIVE skills are created with approved=False until an operator approves. It omits whether the call itself requires a scope, and what happens on a name collision or re-promotion of the same session, which matters for a create-style mutation.

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?

Sentences are front-loaded: purpose first, then storage/scoring behavior, then the safety rule, then Args. The Args block is slightly redundant since the schema enumerates the same fields, and RST markup plus the safety-rule framing add a little visual noise, but no sentence is wasted.

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?

For a six-parameter mutation tool with an output schema (so return values need no explanation), the description covers purpose, side effects, gating, and all parameter meanings. The remaining gap is call-level authorization and idempotency/overwrite semantics, which an agent would still have to discover by trial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 supply all meaning and it does: every one of the six parameters is explained with format detail the schema lacks (8-char prefix or full UUID for session_id, allowed values SAFE_READ|SAFE_WRITE|DESTRUCTIVE with default for safety_scope, and content guidance for body and applicable_context). This fully compensates for the empty schema titles.

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?

Opens with a specific verb+resource+output: "Promote a completed agent session to a named, versioned Skill." It names the source object (session), the destination (registry skill), and the derived quality score, which distinguishes it from siblings like get_skill or approve_skill.

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?

Routes the agent to the correct follow-up by naming ``approve_skill`` and the SYSTEM_ADMIN scope required when safety_scope is DESTRUCTIVE, so the agent knows the workflow continues elsewhere. It does not state negative conditions (e.g. when not to promote, or whether an existing skill with the same name is rejected), leaving some inference.

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

Deploy Server

Other Tools