Skip to main content
Glama
sgx-labs

Stateless Agent Memory Engine (SAME)

reindex

Destructive

Refresh search results by updating the index of markdown notes. Re-embeds changed files to ensure accurate retrieval, with an option to force full re-indexing.

Instructions

Re-scan and re-index all markdown notes. Use this if the user has added or changed notes and search results seem stale. Incremental by default (only re-embeds changed files).

Args: force: Re-embed all files regardless of changes (default false)

Returns indexing statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceYesRe-embed all files regardless of changes

Implementation Reference

  • The tool "reindex" is called as a subcommand of a binary `SAME_BIN` (likely a prebuilt binary) via a subprocess call. The actual handler implementation resides within the compiled binary, not in the provided source code.
    reindex_result = subprocess.run(
        [SAME_BIN, "reindex", "--force"],
Behavior4/5

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

The description adds valuable behavioral context beyond the destructiveHint annotation: it explains the default incremental behavior (only re-embeds changed files) and the effect of the force parameter. While annotations cover the destructive nature, the description clarifies what gets re-indexed and the performance implications, though it could mention potential downtime or resource usage.

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 a clear purpose statement, usage guidelines, and parameter details in separate sections. It's front-loaded with key information, though the Args and Returns sections could be integrated more seamlessly. Every sentence adds value, but minor redundancy exists between the description and parameter details.

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?

Given the tool's complexity (destructive operation with one parameter) and lack of output schema, the description is mostly complete: it explains purpose, usage, behavior, and return value (indexing statistics). However, it doesn't detail the format of the statistics or error conditions, leaving some gaps for an agent to interpret results.

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?

With 100% schema description coverage, the schema already documents the 'force' parameter fully. The description repeats the parameter's purpose in the Args section but adds minimal extra context beyond the schema, such as the default value (false). This meets the baseline for high schema coverage.

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 specific action ('Re-scan and re-index all markdown notes') and distinguishes it from siblings by focusing on refreshing search indices rather than creating, retrieving, or searching notes. It specifies the resource type (markdown notes) and the verb (re-index).

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?

Explicitly states when to use this tool ('if the user has added or changed notes and search results seem stale') and provides an alternative behavior via the 'force' parameter. It differentiates from sibling tools like search_notes or index_stats by focusing on maintenance rather than querying or reporting.

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/sgx-labs/statelessagent'

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