Skip to main content
Glama
kvnpetit

SRC (Structured Repo Context)

by kvnpetit

get_index_status

get_index_status
Read-onlyIdempotent

Verify codebase index status before searching. Returns file count, chunk count, and indexed languages to confirm search readiness.

Instructions

Check if a codebase is indexed and ready for search. USE THIS to verify index exists before searching. Returns file count, chunk count, and indexed languages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directoryNoPath to the directory to check (defaults to current directory).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
metaYes
errorNo
messageNo
successYes
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "corrupt": {
      +          "type": "boolean"
      +        },
      +        "directory": {
      +          "type": "string"
      +        },
      +        "exists": {
      +          "type": "boolean"
      +        },
      +        "hash_cache_present": {
      +          "type": "boolean"
      +        },
      +        "indexPath": {
      +          "type": "string"
      +        },
      +        "index_freshness": {
      +          "enum": [
      +            "fresh",
      +            "stale",
      +            "unknown"
      +          ],
      +          "type": "string"
      +        },
      +        "languages": {
      +          "additionalProperties": {
      +            "maximum": 9007199254740991,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "lastUpdated": {
      +          "type": "string"
      +        },
      +        "metadata": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "chunkOverlap": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "chunkSize": {
      +              "exclusiveMinimum": 0,
      +              "maximum": 9007199254740991,
      +              "type": "integer"
      +            },
      +            "createdAt": {
      +              "type": "string"
      +            },
      +            "embeddingDimensions": {
      +              "exclusiveMinimum": 0,
      +              "maximum": 9007199254740991,
      +              "type": "integer"
      +            },
      +            "embeddingModel": {
      +              "type": "string"
      +            },
      +            "embeddingProvider": {
      +              "enum": [
      +                "ollama",
      +                "lexical",
      +                "unknown"
      +              ],
      +              "type": "string"
      +            },
      +            "legacy": {
      +              "type": "boolean"
      +            },
      +            "schemaVersion": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "sourceFingerprint": {
      +              "type": "string"
      +            },
      +            "updatedAt": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "schemaVersion",
      +            "embeddingProvider",
      +            "embeddingModel",
      +            "embeddingDimensions",
      +            "createdAt",
      +            "updatedAt"
      +          ],
      +          "type": "object"
      +        },
      +        "metadataError": {
      +          "type": "string"
      +        },
      +        "storage_bytes": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "storage_scan_truncated": {
      +          "type": "boolean"
      +        },
      +        "totalChunks": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "totalFiles": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "write_lock_present": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "directory",
      +        "indexPath",
      +        "exists",
      +        "totalChunks",
      +        "totalFiles",
      +        "languages"
      +      ],
      +      "type": "object"
      +    },
      +    "error": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "meta": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "bounded": {
      +          "const": true,
      +          "type": "boolean"
      +        },
      +        "confidence": {
      +          "maximum": 1,
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        "coverage": {
      +          "enum": [
      +            "precise",
      +            "approximate",
      +            "unknown"
      +          ],
      +          "type": "string"
      +        },
      +        "generated_at": {
      +          "type": "string"
      +        },
      +        "index_freshness": {
      +          "enum": [
      +            "fresh",
      +            "stale",
      +            "unknown"
      +          ],
      +          "type": "string"
      +        },
      +        "instruction_signals": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "count": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "detected": {
      +              "type": "boolean"
      +            },
      +            "kinds": {
      +              "items": {
      +                "enum": [
      +                  "instruction_override",
      +                  "authority_spoofing",
      +                  "tool_execution_request",
      +                  "secret_exfiltration_request",
      +                  "delimiter_spoofing",
      +                  "hidden_unicode",
      +                  "encoded_instruction"
      +                ],
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "scan_truncated": {
      +              "type": "boolean"
      +            },
      +            "scanned_bytes": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "signals": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "column": {
      +                    "maximum": 9007199254740991,
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "confidence": {
      +                    "maximum": 1,
      +                    "minimum": 0,
      +                    "type": "number"
      +                  },
      +                  "kind": {
      +                    "enum": [
      +                      "instruction_override",
      +                      "authority_spoofing",
      +                      "tool_execution_request",
      +                      "secret_exfiltration_request",
      +                      "delimiter_spoofing",
      +                      "hidden_unicode",
      +                      "encoded_instruction"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "line": {
      +                    "exclusiveMinimum": 0,
      +                    "maximum": 9007199254740991,
      +                    "type": "integer"
      +                  },
      +                  "offset": {
      +                    "maximum": 9007199254740991,
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "reason": {
      +                    "type": "string"
      +                  },
      +                  "source": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "kind",
      +                  "line",
      +                  "column",
      +                  "offset",
      +                  "confidence",
      +                  "reason"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "detected",
      +            "count",
      +            "kinds",
      +            "signals",
      +            "scanned_bytes",
      +            "scan_truncated"
      +          ],
      +          "type": "object"
      +        },
      +        "local_only": {
      +          "const": true,
      +          "type": "boolean"
      +        },
      +        "provenance": {
      +          "enum": [
      +            "local-analysis",
      +            "local-filesystem",
      +            "local-index",
      +            "local-lsp"
      +          ],
      +          "type": "string"
      +        },
      +        "source_is_untrusted": {
      +          "type": "boolean"
      +        },
      +        "source_revision": {
      +          "type": "string"
      +        },
      +        "truncated": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "generated_at",
      +        "local_only",
      +        "bounded",
      +        "provenance"
      +      ],
      +      "type": "object"
      +    },
      +    "schema_version": {
      +      "const": 1,
      +      "type": "number"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "schema_version",
      +    "success",
      +    "meta"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.0.3

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already disclose the safety profile (readOnlyHint=true, idempotentHint=true, destructiveHint=false, openWorldHint=false), so the description's burden is minimal. It adds value by previewing the return payload (file count, chunk count, indexed languages), which goes beyond the annotations without contradicting them.

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?

Three compact sentences with the core purpose front-loaded, a directive usage hint, and a return-payload note. Every sentence earns its place; there is no fluff or boilerplate.

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 simple 1-optional-parameter tool with rich annotations and an output schema, the description covers purpose, usage timing, and the essence of the return values. Nothing an agent needs to call it correctly is materially missing.

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 coverage is 100% for the single 'directory' parameter, with its default and purpose already documented in the schema. The description adds no parameter-level syntax or format details beyond what the schema provides, so the baseline 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 states a specific verb+resource ('Check if a codebase is indexed and ready for search') and clearly positions the tool as a verification step distinct from mutation siblings like index_codebase, update_index, and maintain_index. It does not explicitly name a sibling, which keeps it from a 5, but the purpose is unambiguous.

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?

'USE THIS to verify index exists before searching' is an explicit when-to-use directive that routes the agent to this tool ahead of search operations. It lacks an explicit when-not-to-use statement or named alternative (e.g., 'use index_codebase if not indexed'), so it falls short of full guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.