Skip to main content
Glama

kage_refresh

Idempotent

Rebuild repository indexes, code graph, memory graph, and metrics after file changes to prepare for PR checks. Skips metadata rewrites on non-default branches to avoid merge conflicts, unless forced.

Instructions

Rebuild repo indexes, code graph, memory graph, metrics, and stale-memory metadata. Agents should run this after meaningful file/content changes before PR checks; push-only or same-tree commits do not need another refresh. On non-default git branches metadata-only packet rewrites are skipped (quiet refresh) to avoid merge conflicts; pass force to persist them anyway.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_dirYesAbsolute path to the repository root.
forceNoPersist packet metadata rewrites even on a non-default branch
Behavior5/5

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

Goes beyond annotations by detailing the 'quiet refresh' behavior on non-default branches and how 'force' alters this. This adds significant context about side effects and merge conflict avoidance, which is not in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: the first states the action and resources, the second provides usage guidance and parameter context. Every sentence adds value, no redundancy.

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 2-parameter tool with no output schema, the description covers all essential aspects: purpose, usage conditions, behavioral nuance on branches, and parameter semantics. Completely adequate.

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?

Although schema coverage is 100%, the description adds meaningful context: it explains that 'force' persists metadata rewrites even on non-default branches, linking the parameter to the behavioral description.

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 explicitly states the verb 'Rebuild' and lists the resources: repo indexes, code graph, memory graph, metrics, and stale-memory metadata. It distinguishes this tool from siblings like kage_context or kage_pr_check by specifying its unique function.

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?

Provides clear when-to-use instructions: after meaningful file/content changes before PR checks. Also states when not to use: push-only or same-tree commits. Additionally, explains behavior on non-default branches and the role of the 'force' parameter.

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/kage-core/Kage'

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