Skip to main content
Glama
kvnpetit

SRC (Structured Repo Context)

by kvnpetit

update_index

update_index
Idempotent

Update the repository search index after code changes. Process only changed files via SHA-256 detection instead of full re-indexing; use dryRun to preview.

Instructions

Refresh the search index after code changes. USE THIS instead of re-indexing - it's fast because it only processes changed files (SHA-256 hash detection). Use dryRun=true to preview changes first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoForce re-index of all files (ignore hash cache)
dryRunNoOnly report changes without updating the index
directoryNoPath to the indexed directory.
concurrencyNoNumber of files to process in parallel (default: 4)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
metaYes
errorNo
messageNo
successYes
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 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"
    • addedInput schema / properties / concurrency
      Added value: +{
      +  "default": 4,
      +  "description": "Number of files to process in parallel (default: 4)",
      +  "exclusiveMinimum": 0,
      +  "maximum": 32,
      +  "type": "integer"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "added": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "directory": {
      +          "type": "string"
      +        },
      +        "dryRun": {
      +          "type": "boolean"
      +        },
      +        "errors": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "modified": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "removed": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "unchanged": {
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "directory",
      +        "dryRun",
      +        "added",
      +        "modified",
      +        "removed",
      +        "unchanged",
      +        "errors"
      +      ],
      +      "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

A4.5/5.0
Behavior4/5

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

Annotations already indicate idempotentHint=true and destructiveHint=false, but the description adds real behavioral detail: it only processes changed files via SHA-256 hash detection and supports dry-run preview. This explains the tool's side effects and performance characteristics beyond what the annotations state.

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 short sentences, no filler, and the key purpose is front-loaded. The imperative 'USE THIS' is slightly informal but functionalbrain; every sentence earns its place by adding either scope, rationale, or a safety tip.

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 output schema exists source and annotations cover safety and idempotence, the description provides what an agent needs to call the tool appropriately: purpose, trigger, differentiation from alternatives, and a safe preview option. Nothing critical is 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?

The schema already documents all four parameters with descriptions and defaults, so the baseline is 3. The description adds a small operational note about dryRun=true, but it does not materially extend the schema's parameter documentation. With 100% coverage, this is acceptable.

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 a specific action ('Refresh the search index') with a clear trigger ('after code changes'), plus a defining characteristic that separates it from a full re-index. The phrase 'USE THIS instead of re-indexing' explicitly distinguishes it from the heavier sibling tools, leaving no ambiguity about its role.

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

Usage Guidelines5/5

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

It gives direct usage direction: use this tool instead of a full re-index when code changes, and use dryRun=true to preview before mutating. This is explicit, actionable guidance with a clear condition and an alternative behavior, which is all that is needed for an agent to select it correctly.

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