Skip to main content
Glama

Preview source folder filters

preview_source_scope_rules
Read-onlyIdempotent

Previews replacement include/exclude rules for one source scope. The request identifies the scope by sourceScopeId and its current updatedAt revision as expectedUpdatedAt. Each supplied array replaces that full list; an omitted field remains unchanged and [] clears the list. Patterns are relative to this scope root: * matches within one path segment, ** crosses folders, and ? matches one non-slash character. Includes form an allowlist and excludes take precedence. The read-only result counts currently indexed, available files matching the proposed rules and returns up to eight scope-relative examples plus newly included or excluded files. Scanning is capped at 5,000 indexed files; when filesMatchedExact is false, counts are lower bounds.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sourceScopeId": "<sourceScopeId>",
      "expectedUpdatedAt": "<expectedUpdatedAt>"
    },
    "name": "preview_source_scope_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceScopeIdYes
excludePatternsNo
includePatternsNo
expectedUpdatedAtYes

Output Schema

NameRequiredDescriptionDefault
afterYes
beforeYes
statusYes
effectsYes
previewHashYes
sourceScopeYes
expectedUpdatedAtYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses that supplied arrays replace the full list, omitted fields stay unchanged, [] clears, excludes take precedence over includes, scanning is capped at 5,000 indexed files, and counts are lower bounds when filesMatchedExact is false. These are non-obvious semantics an agent could not infer from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the operation, then replacement semantics, then glob syntax, then return behavior — a sensible order with no filler. The pattern-syntax sentence is dense but each clause is load-bearing for correct pattern construction.

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 read-only preview with four parameters and an output schema, the description supplies the mutation-like semantics of the arrays, the concurrency token, and the exactness caveat on counts. What remains unstated — that expectedUpdatedAt must be fetched beforehand, and concrete example return fields — is minor given the output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and does it: it explains that sourceScopeId identifies the scope, expectedUpdatedAt is the current revision used for optimistic concurrency, and that includePatterns/excludePatterns replace the whole list with [] as the clear signal. It also defines glob semantics (`*`, `**`, `?`) that the schema does not express.

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 first sentence names a specific verb and resource — previewing replacement include/exclude rules for a single source scope — which clearly separates it from list_source_scopes and search_sources. An agent can identify the operation without opening the schema.

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?

Usage is strongly implied by 'previews' and the request/response framing (test rules before applying, pass the current revision to detect staleness), but there is no explicit statement of when to use this versus list_source_scopes or search_sources, and no stated prerequisite about the revision coming from a prior read.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources