Skip to main content
Glama

self_improve

Read-onlyIdempotent

Run a full token-efficiency self-improvement cycle: diagnose leaks, get ranked suggestions, and see simulated impact of the best change.

Instructions

Runs the full self-improvement cycle in one call: (1) gets your current token pillars — either from the provided text or by running tokenpull on your local logs, (2) diagnoses where you're leaking efficiency (diagnose_cascade), (3) generates ranked improvement suggestions (suggest_improvements), (4) simulates the top suggestion (simulate_change), and (5) returns the complete cycle: diagnosis + suggestions + the simulated impact of the best change. This is the 'one-click optimize' tool — call it at the end of a session to see what to improve next time. If you provide pillars in text, it skips the tokenpull step. If you omit text, it runs tokenpull first (requires local ccusage logs). Pure local math — no network, no submission. The scope parameter adds mode detection (BUILD/EDIT/DEBUG/MAINTAIN/IDLE) and scoped analysis: 'daily' (default — current behavior + mode), 'weekly' (compound into weekly snapshots + report artifact), 'trend' (30d/90d trajectory analysis).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoOptional: token pillars — ccusage JSON or "input output cacheCreate cacheRead". If omitted, runs tokenpull to get current pillars from local logs.
scopeNoAnalysis scope: "daily" (default — current behavior + mode detection), "weekly" (compound daily rows into weekly snapshots + report artifact with badges), "trend" (30d/90d trajectory + phase patterns). Daily modes never leave the machine — only weekly distribution goes in submitted reports.
windowNoWhich time window to pull when running tokenpull (default: 30d). Ignored if `text` is provided.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoDetected mode { mode, confidence } — present when scope is daily/weekly/trend
trendNoTrend analysis (trend scope)
adviceNoAdvice for next session (daily scope)
reportNoWeekly report artifact (weekly scope)
pillarsNoThe 4 raw token pillars used
diagnosisNoEfficiency leaks found (from diagnose_cascade)
assessmentNoOne-line assessment for daily scope
suggestionsNoRanked improvements (from suggest_improvements)
cycle_summaryNoOne-line summary of the full cycle
quality_scoreNoYield relative to mode expectation (daily scope)
best_simulationNoSimulated result of the top suggestion
current_cascadeNo
Behavior5/5

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

Beyond annotations (readOnlyHint=true, idempotentHint=true), the description adds key behavioral info: 'Pure local math — no network, no submission' and details each step. No contradictions with annotations.

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 long but well-structured, with steps enumerated and front-loaded purpose. Every sentence adds value, though it could be slightly more concise without losing information.

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?

Given the tool's complexity (multi-step cycle with optional inputs), the description is complete. It covers input parameters, conditions (text vs. no text), scope behavior, and safety (local-only). The presence of an output schema reduces the need to describe return values.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. The description adds value by explaining that 'text' skips tokenpull, 'scope' adds mode detection and scoped analysis, and 'window' is ignored if text is provided. This contextualizes the parameters well.

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 clearly states the tool runs a full self-improvement cycle in one call, listing the five steps. It distinguishes itself from sibling tools (e.g., diagnose_cascade, suggest_improvements) by calling itself the 'one-click optimize' tool, making its purpose unambiguous.

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?

The description specifies when to call it ('at the end of a session'), how to use the 'text' parameter to skip tokenpull, and notes that omitting 'text' requires local logs. It provides clear context but does not explicitly state when not to use it or compare to alternatives beyond implying it is a bundled alternative.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SunrisesIllNeverSee/sigrank-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server