Skip to main content
Glama
vjsr007
by vjsr007

index-list-keys

List and count known keys in MCP Index Notes to organize and manage indexed data, enabling efficient retrieval and analysis of tagged and semantic connections.

Instructions

List known keys and counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Implementation Reference

  • Tool handler for 'index-list-keys': parses optional limit parameter (1-500, default 100), calls db.listKeys() with the limit, and returns the result as JSON array of {key: string, count: number}.
    case 'index-list-keys': {
      const parsed = z.object({ limit: z.number().positive().max(500).optional().default(100) }).parse(args ?? {});
      const keys = db.listKeys(parsed.limit);
      return { content: [{ type: 'text', text: JSON.stringify(keys) }] };
    }
  • src/mcp.ts:154-158 (registration)
    Registers the MCP tool 'index-list-keys' in the tools array provided to the MCP server, including name, description, and input schema for optional 'limit' parameter.
    {
      name: 'index-list-keys',
      description: 'List known keys and counts.',
      inputSchema: { type: 'object', properties: { limit: { type: 'number' } } },
    },
  • JSON schema definition for the tool input: object with optional 'limit' number property.
    inputSchema: { type: 'object', properties: { limit: { type: 'number' } } },
  • Implementation of listKeys in NotesDB (SQLite): SQL query groups notes by key, counts occurrences, orders by descending count then ascending key, limits results, returns array of {key, count}.
    listKeys(limit = 100) {
      const rows = this.db.prepare(`SELECT key, COUNT(*) as count FROM notes GROUP BY key ORDER BY count DESC, key ASC LIMIT ?`).all(limit);
      return rows as Array<{ key: string; count: number }>;
    }
  • TypeScript interface INotesStore defines the listKeys method signature used by all store implementations.
    listKeys(limit?: number): Array<{ key: string; count: number }>;
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists keys and counts, implying a read-only operation, but doesn't specify whether it's safe, if it requires authentication, what format the output is in, or any rate limits. This leaves significant gaps in understanding the tool's behavior.

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?

The description 'List known keys and counts' is a single, efficient sentence with no wasted words. It's front-loaded and appropriately sized for a simple tool, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's apparent simplicity (one parameter, no output schema, no annotations), the description is incomplete. It doesn't cover parameter meaning, output format, or behavioral traits like safety or prerequisites, which are necessary for the agent to use it effectively in context with sibling tools.

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

Parameters2/5

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

The input schema has one parameter ('limit') with 0% description coverage, and the tool description adds no information about parameters. It doesn't explain what 'limit' means (e.g., maximum number of keys to return) or how it affects the output, failing to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List known keys and counts' clearly states the action (list) and target (keys with counts), which is specific enough to understand the tool's function. However, it doesn't explicitly differentiate from sibling tools like 'index-query' or 'index-stats', which might have overlapping functionality, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'index-query' or 'index-stats'. It lacks context about prerequisites, such as whether an index must exist, or exclusions, leaving the agent to infer usage from the tool name alone.

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/vjsr007/mcp-index-notes'

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