Skip to main content
Glama

status

Check server health, session state, and cache statistics to debug data freshness and connectivity issues in Disney Parks information.

Instructions

Get server health status, session state, and cache statistics. Useful for debugging data freshness and connectivity issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeDetailsNoInclude detailed cache and entity breakdown (default: false)

Implementation Reference

  • The handler function that implements the core logic of the 'status' tool, collecting server uptime, session statuses, cache statistics, database stats, embedding stats, and health checks, optionally including detailed entity counts.
    export const handler: ToolHandler = async (args) => {
      return withTimeout(
        "status",
        async () => {
          const includeDetails = args.includeDetails === true;
    
          const sessionManager = getSessionManager();
          const dbStats = await getDatabaseStats();
          const cacheStats = await getCacheStats();
          const embeddingStats = await getEmbeddingStats();
    
          // Get session status for each destination
          const wdwSession = await sessionManager.getSessionStatus("wdw");
          const dlrSession = await sessionManager.getSessionStatus("dlr");
    
          const status = {
            server: {
              version: "1.0.0",
              uptime: Math.round(process.uptime()),
              timestamp: new Date().toISOString(),
            },
            sessions: {
              wdw: {
                hasSession: wdwSession.hasSession,
                isValid: wdwSession.isValid,
                expiresAt: wdwSession.expiresAt,
                errorCount: wdwSession.errorCount,
              },
              dlr: {
                hasSession: dlrSession.hasSession,
                isValid: dlrSession.isValid,
                expiresAt: dlrSession.expiresAt,
                errorCount: dlrSession.errorCount,
              },
            },
            cache: {
              totalEntries: cacheStats.totalEntries,
              expiredEntries: cacheStats.expiredEntries,
              sources: cacheStats.sources,
            },
            database: {
              entityCount: dbStats.entityCount,
              cacheEntries: dbStats.cacheEntries,
              sizeKb: Math.round(dbStats.dbSizeBytes / 1024),
            },
            embeddings: {
              total: embeddingStats.total,
              ready: embeddingStats.total >= dbStats.entityCount,
              byModel: embeddingStats.byModel,
            },
            health: {
              databaseHealthy: dbStats.entityCount >= 0,
              cacheHealthy: cacheStats.expiredEntries < cacheStats.totalEntries,
              wdwSessionHealthy: wdwSession.isValid || !wdwSession.hasSession,
              dlrSessionHealthy: dlrSession.isValid || !dlrSession.hasSession,
            },
          };
    
          // Add detailed breakdown if requested
          if (includeDetails) {
            const wdwCounts = await getEntityCounts("wdw");
            const dlrCounts = await getEntityCounts("dlr");
    
            Object.assign(status, {
              details: {
                wdw: {
                  attractions: wdwCounts.ATTRACTION,
                  restaurants: wdwCounts.RESTAURANT,
                  shows: wdwCounts.SHOW,
                },
                dlr: {
                  attractions: dlrCounts.ATTRACTION,
                  restaurants: dlrCounts.RESTAURANT,
                  shows: dlrCounts.SHOW,
                },
              },
            });
          }
    
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(status, null, 2),
              },
            ],
          };
        },
        TIMEOUTS.STATUS
      );
    };
  • The tool definition including name, description, and input schema for optional detailed output.
    export const definition: ToolDefinition = {
      name: "status",
      description:
        "Get server health status, session state, and cache statistics. " +
        "Useful for debugging data freshness and connectivity issues.",
      inputSchema: {
        type: "object" as const,
        properties: {
          includeDetails: {
            type: "boolean",
            description: "Include detailed cache and entity breakdown (default: false)",
          },
        },
        required: [],
      },
    };
  • The 'status' tool is registered in the central tools array alongside other tools, imported from './status.js' on line 14.
    const tools: ToolEntry[] = [
      { definition: destinations.definition, handler: destinations.handler },
      { definition: attractions.definition, handler: attractions.handler },
      { definition: dining.definition, handler: dining.handler },
      { definition: search.definition, handler: search.handler },
      { definition: discover.definition, handler: discover.handler },
      { definition: status.definition, handler: status.handler },
      { definition: sync.definition, handler: sync.handler },
    ];
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 tool's purpose and use case but lacks details on behavioral traits like performance characteristics, error handling, or whether it requires specific permissions. The mention of 'debugging' implies it's safe and read-only, but this isn't explicitly stated.

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 appropriately sized with two sentences that are front-loaded and efficient. The first sentence states the purpose, and the second provides usage context, with no wasted words or redundancy.

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

Completeness3/5

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

Given the tool's low complexity (1 optional parameter, no output schema), the description is somewhat complete but lacks details on return values or error conditions. Without annotations or an output schema, it should ideally specify what 'health status' or 'cache statistics' entail, but it's adequate for a simple diagnostic tool.

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?

The input schema has 100% description coverage, so the schema already documents the 'includeDetails' parameter. The description doesn't add meaning beyond what the schema provides, such as explaining the impact of setting 'includeDetails' to true. With high schema coverage, the baseline score of 3 is appropriate.

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 clearly states the tool's purpose with specific verbs ('Get server health status, session state, and cache statistics') and identifies the resource being accessed. It distinguishes itself from siblings like 'list_parks' or 'search' by focusing on system diagnostics rather than data retrieval, though it doesn't explicitly name alternatives for similar functions.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool ('Useful for debugging data freshness and connectivity issues'), which helps differentiate it from other tools. However, it doesn't explicitly state when not to use it or name specific alternative tools for overlapping purposes, such as checking connectivity via other means.

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/cameronsjo/mouse-mcp'

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