Skip to main content
Glama
sirrlock

Sirr MCP Server

by sirrlock

check_secret

Verify secret availability and inspect metadata without consuming reads. Check status, read counts, and expiry before fetching from the Sirr vault.

Instructions

Check whether a secret exists and inspect its metadata — WITHOUT consuming a read. Use this to verify a secret is still available before fetching it, or to inspect read counts and expiry. Returns status (active/sealed), reads used/remaining, and expiry. A 'sealed' secret has exhausted its max_reads; it still exists but cannot be read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesSecret key name. Accepts 'sirr:KEYNAME', 'KEYNAME#id', or bare key name.

Implementation Reference

  • The handler logic for the 'check_secret' tool, which performs a HEAD request to check the status of a secret without consuming it.
    case "check_secret": {
      const rawKey = (args as { key: string }).key;
      const key = parseKeyRef(rawKey);
    
      const res = await fetchWithTimeout(
        `${SIRR_SERVER}${secretsPath(encodeURIComponent(key))}`,
        { method: "HEAD", headers: { Authorization: `Bearer ${SIRR_TOKEN}` } },
      );
    
      if (res.status === 404) {
        return { content: [{ type: "text" as const, text: `Secret '${key}' not found or expired.` }] };
      }
    
      const status = res.headers.get("X-Sirr-Status") ?? (res.status === 410 ? "sealed" : "active");
      const readCount = res.headers.get("X-Sirr-Read-Count") ?? "?";
      const readsRemaining = res.headers.get("X-Sirr-Reads-Remaining") ?? "unlimited";
      const expiresAt = res.headers.get("X-Sirr-Expires-At");
      const expiry = expiresAt ? formatTtl(parseInt(expiresAt, 10)) : "no expiry";
    
      if (status === "sealed") {
        return { content: [{ type: "text" as const, text: `Secret '${key}' is sealed — all reads exhausted.\n  Reads used: ${readCount}\n  Expires: ${expiry}` }] };
      }
    
      return {
        content: [{
          type: "text" as const,
          text: `Secret '${key}' is active.\n  Reads used: ${readCount}\n  Reads remaining: ${readsRemaining}\n  Expires: ${expiry}`,
        }],
      };
    }
  • Registration and input schema definition for the 'check_secret' tool.
      name: "check_secret",
      description:
        "Check whether a secret exists and inspect its metadata — WITHOUT consuming a read. " +
        "Use this to verify a secret is still available before fetching it, or to inspect read counts and expiry. " +
        "Returns status (active/sealed), reads used/remaining, and expiry. " +
        "A 'sealed' secret has exhausted its max_reads; it still exists but cannot be read.",
      inputSchema: {
        type: "object" as const,
        properties: {
          key: {
            type: "string",
            description: "Secret key name. Accepts 'sirr:KEYNAME', 'KEYNAME#id', or bare key name.",
          },
        },
        required: ["key"],
      },
    },
Behavior4/5

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

With no annotations, the description carries full disclosure burden. It successfully explains the critical side-effect constraint (no read consumption), documents return value structure (status, reads used/remaining, expiry), and defines domain-specific state ('sealed'). Missing only generic items like error conditions or auth requirements.

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?

Four sentences with zero waste: (1) core purpose + key constraint, (2-3) specific use cases, (4) domain concept definition. Information is front-loaded with the critical 'no read consumption' differentiator. Every sentence 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?

Given the single parameter, lack of annotations, and absence of output schema, the description is complete. It compensates for the missing output schema by detailing return fields (status, reads, expiry) and explains the 'sealed' domain logic necessary for correct interpretation of results.

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?

Schema description coverage is 100%, documenting the 'key' parameter formats ('sirr:KEYNAME', 'KEYNAME#id', etc.). The description implies the key identifies the secret to check but does not add semantic meaning beyond the comprehensive schema, warranting the baseline score for high-coverage schemas.

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 specific verbs ('Check', 'inspect') and clearly identifies the resource (secret metadata). It effectively distinguishes itself from sibling 'get_secret' by emphasizing 'WITHOUT consuming a read' and positioning itself as the pre-fetch verification step.

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?

Provides explicit 'when-to-use' guidance: 'before fetching it' (implying get_secret) and for inspecting 'read counts and expiry'. Clear context for why to choose this over the fetch alternative, though it could explicitly name 'get_secret' for a perfect 5.

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/sirrlock/mcp'

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