Skip to main content
Glama
davidmosiah

Google Health MCP

by davidmosiah

Google Health Cache Status

google_health_cache_status
Read-onlyIdempotent

Check if a local SQLite cache is enabled for Google Health data, and view its status in markdown or JSON format.

Instructions

Show optional local SQLite cache status. Enable with GOOGLE_HEALTH_CACHE=sqlite or GOOGLE_HEALTH_CACHE=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
response_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
enabledYes
pathYes
entriesYes
newest_cached_atNo

Implementation Reference

  • The registration and handler for the google_health_cache_status tool. Receives the optional response_format, calls client().cacheStatus() to get the status, and returns the result formatted as a bullet list or JSON.
    server.registerTool("google_health_cache_status", {
      title: "Google Health Cache Status",
      description: "Show optional local SQLite cache status. Enable with GOOGLE_HEALTH_CACHE=sqlite or GOOGLE_HEALTH_CACHE=true.",
      inputSchema: ResponseOnlyInputSchema.shape,
      outputSchema: CacheStatusOutputSchema.shape,
      annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
    }, async ({ response_format }) => {
      try {
        const status = client().cacheStatus();
        return makeResponse(status, response_format, bulletList("Google Health Cache Status", status));
      } catch (error) {
        return makeError((error as Error).message);
      }
    });
  • Zod schema defining the output shape: enabled (boolean), path (string), entries (non-negative integer), and optional newest_cached_at (string).
    export const CacheStatusOutputSchema = z.object({
      enabled: z.boolean(),
      path: z.string(),
      entries: z.number().int().nonnegative(),
      newest_cached_at: z.string().optional()
    }).strict();
  • The GoogleHealthCache.status() method that queries the SQLite cache database for total entry count and newest cached_at timestamp.
    status(): CacheStatus {
      const row = this.db.prepare("SELECT COUNT(*) AS entries, MAX(cached_at) AS newest_cached_at FROM api_cache").get() as { entries: number; newest_cached_at?: string };
      return { enabled: true, path: this.path, entries: row.entries, newest_cached_at: row.newest_cached_at };
    }
  • GoogleHealthClient.cacheStatus() — the method invoked by the tool handler. Returns disabled status if cache is not enabled, otherwise delegates to GoogleHealthCache.status().
    cacheStatus(): CacheStatus {
      if (!this.config.cacheEnabled) return disabledCacheStatus(this.config.cachePath);
      return this.getCache().status();
    }
  • Helper function that returns a disabled CacheStatus when caching is not configured.
    export function disabledCacheStatus(path: string): CacheStatus {
      return { enabled: false, path, entries: 0 };
    }
Behavior4/5

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

Annotations already indicate readOnlyHint and idempotentHint. The description adds meaningful behavioral context: it's a local SQLite cache, and explains how to enable it via environment variables. No contradiction with annotations.

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 main purpose and adds key context about enabling the feature. No wasted words.

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?

Given the tool's low complexity, one optional parameter, and existing annotations plus output schema, the description adequately explains the tool's purpose and behavior. It could optionally mention the output format, but the output schema already covers that.

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 0% description coverage for its single parameter (response_format). The description does not explain the parameter, its default, or valid values. Although the parameter is simple with a clear enum, the description fails to compensate for the lack of schema descriptions.

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 shows the status of an optional local SQLite cache, using the verb 'Show' and identifying the resource. It is distinct from sibling tools like google_health_connection_status, though not explicitly compared.

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 cache status when the cache is enabled, and provides context on how to enable it. However, it does not specify when to use this tool over others or any prerequisites beyond configuration.

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/davidmosiah/google-health-mcp'

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