Skip to main content
Glama

status

Check system health and configuration for a local document search tool that processes PDF, DOCX, TXT, and Markdown files on your machine.

Instructions

Get system status including total documents, total chunks, database size, and configuration information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'status' MCP tool in the ListTools response, defining name, description, and empty input schema.
    {
      name: 'status',
      description:
        'Get system status including total documents, total chunks, database size, and configuration information.',
      inputSchema: { type: 'object', properties: {} },
    },
  • Primary handler function for the 'status' tool. Fetches status data from VectorStore and formats it as JSON text content for MCP response.
    async handleStatus(): Promise<{ content: [{ type: 'text'; text: string }] }> {
      try {
        const status = await this.vectorStore.getStatus()
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(status, null, 2),
            },
          ],
        }
      } catch (error) {
        console.error('Failed to get status:', error)
        throw error
      }
    }
  • Supporting VectorStore.getStatus() method that computes detailed system metrics including document/chunk counts, memory usage, uptime, FTS status, and search mode.
    async getStatus(): Promise<{
      documentCount: number
      chunkCount: number
      memoryUsage: number
      uptime: number
      ftsIndexEnabled: boolean
      searchMode: 'hybrid' | 'vector-only'
    }> {
      if (!this.table) {
        return {
          documentCount: 0,
          chunkCount: 0,
          memoryUsage: 0,
          uptime: process.uptime(),
          ftsIndexEnabled: false,
          searchMode: 'vector-only',
        }
      }
    
      try {
        // Retrieve all records
        const allRecords = await this.table.query().toArray()
        const chunkCount = allRecords.length
    
        // Count unique file paths
        const uniqueFilePaths = new Set(allRecords.map((record) => record.filePath as string))
        const documentCount = uniqueFilePaths.size
    
        // Get memory usage (in MB)
        const memoryUsage = process.memoryUsage().heapUsed / 1024 / 1024
    
        // Get uptime (in seconds)
        const uptime = process.uptime()
    
        return {
          documentCount,
          chunkCount,
          memoryUsage,
          uptime,
          ftsIndexEnabled: this.ftsEnabled,
          searchMode:
            this.ftsEnabled && (this.config.hybridWeight ?? 0.6) > 0 ? 'hybrid' : 'vector-only',
        }
      } catch (error) {
        throw new DatabaseError('Failed to get status', error as Error)
      }
    }
  • Tool dispatching switch statement in CallToolRequestSchema handler that routes 'status' calls to handleStatus().
    async (request: { params: { name: string; arguments?: unknown } }) => {
      switch (request.params.name) {
        case 'query_documents':
          return await this.handleQueryDocuments(
            request.params.arguments as unknown as QueryDocumentsInput
          )
        case 'ingest_file':
          return await this.handleIngestFile(
            request.params.arguments as unknown as IngestFileInput
          )
        case 'ingest_data':
          return await this.handleIngestData(
            request.params.arguments as unknown as IngestDataInput
          )
        case 'delete_file':
          return await this.handleDeleteFile(
            request.params.arguments as unknown as DeleteFileInput
          )
        case 'list_files':
          return await this.handleListFiles()
        case 'status':
          return await this.handleStatus()
        default:
          throw new Error(`Unknown tool: ${request.params.name}`)
      }
    }
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. While it indicates this is a read operation ('Get'), it doesn't mention any behavioral traits like whether this requires authentication, has rate limits, returns real-time or cached data, or what format the information comes in. For a status tool with zero annotation coverage, this is a significant gap.

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, efficient sentence that front-loads the core purpose ('Get system status') followed by specific details about what's included. Every word earns its place with no redundancy or unnecessary elaboration.

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?

For a zero-parameter status tool with no output schema, the description provides adequate but minimal information. It tells what information is returned but not the format, structure, or units of measurement. Given the simplicity of the tool (no parameters, no complex operations), this is acceptable but could be more complete by describing the return format.

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?

The tool has zero parameters (schema coverage 100%), so the baseline is 4. The description appropriately doesn't waste space discussing non-existent parameters, though it could theoretically mention that no parameters are required for this status check.

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 verb ('Get') and resource ('system status'), and lists the specific information returned (total documents, total chunks, database size, configuration information). This distinguishes it from sibling tools like list_files or query_documents which focus on different resources.

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. While it's clear this is for retrieving system status information, there's no mention of when this is appropriate versus other tools like list_files for file enumeration or query_documents for document content retrieval.

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/shinpr/mcp-local-rag'

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