Skip to main content
Glama

self_improve

Read-onlyIdempotent

Identifies efficiency leaks in token usage, generates ranked improvement suggestions, and simulates the impact of the best change to optimize next session.

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
Behavior4/5

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

Description adds context that it is 'Pure local math — no network, no submission' and explains the multistep process and scope parameter behavior. Annotations already declare readOnlyHint and idempotentHint, so no 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?

Well-structured with numbered steps and clear sections. Slightly long but every sentence adds value; could be slightly more concise.

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 full parameter coverage, existence of output schema, and annotations, the description is complete and covers all necessary aspects.

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?

All three parameters are fully described in schema (100% coverage). Description adds meaning: text skips tokenpull, scope adds mode detection and scoped analysis, window ignored if text provided.

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 combining tokenpull, diagnose_cascade, suggest_improvements, and simulate_change. It distinguishes from siblings by being the 'one-click optimize' tool.

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?

Explicitly says 'call it at the end of a session' and explains conditional behavior (skip tokenpull if text provided). No explicit when-not-to-use, but clear enough.

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