Skip to main content
Glama

Inspect ISM MCP storage

cache_info

Retrieve offline and user cache directory paths, sizes, file counts, and offline mode status for ISM data.

Instructions

Reports the bundled offline data directory, the writable user cache directory, sizes, file counts, and whether the server is running in offline mode (ISM_MCP_OFFLINE).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core implementation of getCacheInfo() - reads disk cache and bundled data directories, calculates sizes and entry counts, and returns diagnostic info about the ISM MCP storage.
    export async function getCacheInfo(): Promise<{
      cacheDir: string;
      cacheBytes: number;
      cacheEntries: number;
      bundleDir: string;
      bundleEntries: number;
      bundleBytes: number;
      bundleAvailable: boolean;
      bundledVersions: number;
      offline: boolean;
    }> {
      await ensureCacheDir();
      const files = await readdir(CACHE_DIR);
      let cacheBytes = 0;
      for (const f of files) {
        const s = await stat(join(CACHE_DIR, f));
        cacheBytes += s.size;
      }
    
      let bundleEntries = 0;
      let bundleBytes = 0;
      let bundleAvailable = false;
      let bundledVersions = 0;
      if (existsSync(BUNDLED_DIR)) {
        bundleAvailable = true;
        const idx = await loadBundleIndex();
        bundledVersions = idx?.versions.length ?? 0;
        const versionsDir = join(BUNDLED_DIR, "versions");
        if (existsSync(versionsDir)) {
          const tags = await readdir(versionsDir);
          for (const t of tags) {
            const tagDir = join(versionsDir, t);
            const inner = await readdir(tagDir);
            for (const f of inner) {
              const s = await stat(join(tagDir, f));
              bundleEntries += 1;
              bundleBytes += s.size;
            }
          }
        }
      }
    
      return {
        cacheDir: CACHE_DIR,
        cacheBytes,
        cacheEntries: files.length,
        bundleDir: BUNDLED_DIR,
        bundleEntries,
        bundleBytes,
        bundleAvailable,
        bundledVersions,
        offline: OFFLINE,
      };
    }
  • src/index.ts:524-542 (registration)
    Registration of the 'cache_info' tool with MCP server, including schema (inputSchema: {}) and the handler that calls getCacheInfo() and augments results with in-memory cache stats.
    server.registerTool(
      "cache_info",
      {
        title: "Inspect ISM MCP storage",
        description:
          "Reports the bundled offline data directory, the writable user cache directory, sizes, file counts, and whether the server is running in offline mode (ISM_MCP_OFFLINE).",
        inputSchema: {},
      },
      async () => {
        const info = await getCacheInfo();
        return txt({
          ...info,
          memoryCached: {
            catalogs: CATALOG_DOC_CACHE.size,
            flat: CATALOG_CACHE.size,
          },
        });
      },
    );
  • The async handler function for the 'cache_info' tool - calls getCacheInfo() from sources.ts and adds memoryCached stats (catalog doc and flat control cache sizes).
      async () => {
        const info = await getCacheInfo();
        return txt({
          ...info,
          memoryCached: {
            catalogs: CATALOG_DOC_CACHE.size,
            flat: CATALOG_CACHE.size,
          },
        });
      },
    );
  • Input schema for the cache_info tool - accepts no parameters (empty schema), with title and description metadata.
    {
      title: "Inspect ISM MCP storage",
      description:
        "Reports the bundled offline data directory, the writable user cache directory, sizes, file counts, and whether the server is running in offline mode (ISM_MCP_OFFLINE).",
      inputSchema: {},
  • Import of getCacheInfo from ./sources.js, which is the helper function that implements the cache diagnostics logic.
    import {
      getCatalog,
      getCacheInfo,
      getProfile,
      listVersions,
      resolveVersion,
    } from "./sources.js";
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the outputs (directories, sizes, counts, offline mode) but does not mention any side effects, performance impact, or required permissions, which are minimal for a read-only info tool.

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 front-loads the main purpose and uses no unnecessary words. Every word contributes to understanding the tool's output.

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?

For a tool with no parameters and no output schema, the description provides a clear list of reported items. It could be improved by mentioning if the data is real-time or cached, but it is largely complete.

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

Parameters4/5

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

There are zero parameters, so the schema coverage is trivially 100%. The description adds meaning by explaining what the tool reports, which is beyond what the schema offers.

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 uses a specific verb 'reports' and lists the exact resources: bundled offline data directory, writable user cache directory, sizes, file counts, and offline mode status. It clearly distinguishes itself from sibling tools that handle controls, versions, and profiles.

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 usage for checking storage and offline status, but lacks explicit guidance on when to prefer it over siblings or when not to use it. No alternatives or exclusions are mentioned.

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/RusticEagle/ism-mcp'

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