Skip to main content
Glama

optimize_skill

Read-only

Automatically improve an existing skill: runs an optimization loop to lift it against its outcome.

Pack-returner: response is {skill_md, references, skill_id, max_iterations}. The agent runs the optimization loop locally with the user, drives Researcher / Editor / Runner subagents over a locked scenario set, and persists the winner via save_skill(source='optimization') only after explicit user approval. Requires edit access on the skill.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skill_idYesThe skill to act on, identified by its UUID, slug, or name.
max_iterationsNoOptimization loop budget (1 to 1000). Defaults to 20 when omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior1/5

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

Description describes a mutating operation (persisting via save_skill after user approval), but annotation has readOnlyHint=true, which is a direct contradiction.

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?

Multiple sentences but each adds value; front-loaded with purpose and includes necessary technical details like return format. Could be slightly tighter.

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?

Covers process flow, subagents, user approval, edit requirement, and output structure. Has output schema available, so return values are documented.

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 coverage is 100%, and description adds little beyond schema; mentions max_iterations default but no new semantic detail.

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?

Clear verb+resource: 'automatically improve an existing skill' distinguishes it from siblings like save_skill or teach_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?

States requirement of edit access and explains the optimization loop process, but doesn't explicitly mention when not to use or compare with alternatives.

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.