Skip to main content
Glama

list

Retrieve a list of all compressed items stored in the system, including their keys, sizes, and compression ratios, to track and manage compressed data efficiently.

Instructions

List all stored compressed items with their keys, sizes, and compression ratios.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handleList() method reads stored compressed items from disk, parses their JSON metadata, and returns a list of items with keys, algorithms, sizes, ratios, and timestamps.
    handleList() {
      if (!existsSync(STORE_DIR)) return { items: [] };
    
      const files = readdirSync(STORE_DIR).filter(f => f.endsWith('.json'));
      const items = files.map(f => {
        try {
          const meta = JSON.parse(readFileSync(join(STORE_DIR, f), 'utf-8'));
          return {
            key: meta.key,
            algorithm: meta.algorithm,
            original_size: meta.originalSize,
            compressed_size: meta.compressedSize,
            ratio: `${meta.ratio.toFixed(1)}x`,
            stored_at: meta.storedAt
          };
        } catch (e) { return null; }
      }).filter(Boolean);
    
      return { items, count: items.length };
    }
  • Input schema for the 'list' tool definition, which takes no parameters (empty properties object).
    {
      name: 'list',
      description: 'List all stored compressed items with their keys, sizes, and compression ratios.',
      inputSchema: { type: 'object', properties: {} }
    },
  • index.js:618-619 (registration)
    Registration of the 'list' tool within the getToolDefinitions() array returned for tools/list requests.
    name: 'list',
    description: 'List all stored compressed items with their keys, sizes, and compression ratios.',
  • index.js:688-688 (registration)
    Routing in the tools/call handler that dispatches 'list' tool calls to handleList().
    case 'list': result = this.handleList(); break;
Behavior4/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It accurately describes a read-only list operation with no side effects. No contradictions, but it could mention if the tool requires specific permissions or has performance implications.

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 is a single sentence that conveys all necessary information without any extraneous content. Every word earns its place.

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 tool with no parameters and no output schema, the description is complete. It clearly explains what the tool does and what information the response contains.

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?

There are no parameters (schema coverage 100% trivially). The description adds value by specifying the content of the list (keys, sizes, compression ratios), which is beyond the empty schema. Baseline for 0 parameters is 4, and this exceeds expectations.

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 it lists all stored compressed items, specifying the included information (keys, sizes, compression ratios). This distinguishes it from siblings like 'retrieve' (specific item) and 'stats' (aggregate statistics).

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

Usage Guidelines3/5

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

The description implies use for viewing all items but does not explicitly state when to use this tool versus alternatives like 'retrieve' or 'stats'. No exclusions or context are provided, leaving the agent to infer usage from sibling names.

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/ShipItAndPray/mcp-compress'

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