Skip to main content
Glama

gograph_strings

Read-onlyIdempotent

Search Go string literals for one or more case-insensitive substrings and return file, line, literal, and enclosing function. Find raw routes, URLs, SQL fragments, headers, or messages instead of using grep.

Instructions

Search Go string literals in the indexed source files for one or more case-insensitive substrings (OR semantics), returning file, line, the literal, and its enclosing function. Route-shaped terms match any path-parameter spelling (:id, {id}, *id). Source is read through the confined repository reader; unreadable files are named in a warning. WHEN TO USE: To find raw route strings, URLs, SQL fragments, header names, or messages that are not symbols, instead of grep. NOT TO USE: For symbols (use gograph_query) or registered routes with handlers (use gograph_routes). RETURNS: gograph.results.v1 rows of kind string with total/returned/truncated/next_cursor.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gograph_strings"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoAbsolute path of your checkout or worktree (alias cwd).
termNoSubstring to find inside string literals (e.g. '/api/setup/license')
limitNoRows per page.
queryNoAlias of term
termsNoOptional list of substrings combined with OR semantics
cursorNonext_cursor from the previous page.
no_testsNoExclude *_test.go files
intentionNoRationale; required with an active session.
session_idNoSession from session_create; omit for none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.7.21
    • changedInput schema / properties / cursor / description
      Previous value: -"Opaque next_cursor for the same graph snapshot and result selection."New value: +"next_cursor from the previous page."
    • changedInput schema / properties / intention / description
      Previous value: -"Technical rationale, required for analytical calls selecting an active session."New value: +"Rationale; required with an active session."
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum rows per page; the byte budget may return fewer."New value: +"Rows per page."
    • changedInput schema / properties / root / description
      Previous value: -"Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean."New value: +"Absolute path of your checkout or worktree (alias cwd)."
    • changedInput schema / properties / session_id / description
      Previous value: -"Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session."New value: +"Session from session_create; omit for none."
  2. Addedv1.7.18

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds substantial behavior: case-insensitivity, OR combination, path-parameter normalization across ':id', '{id}', '*id', confined repository reading, and warnings for unreadable files. It also discloses the result envelope including truncation and next_cursor, which is the key operational caveat for a paged read.

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 purpose and return shape, then matching nuances, then the WHEN/NOT/ RETURNS blocks — a sensible order with no filler sentences. It is dense and the 'confined repository reader' clause is terse without spelling out the implication, which keeps it just below the top mark.

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?

With no output schema, the description supplies the result shape (gograph.results.v1 rows of kind string, total/returned/truncated/next_cursor), and the cursor parameter is explained in the schema. For a 9-parameter, zero-required, read-only search tool, nothing an agent needs to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: matching is case-insensitive and multiple terms combine with OR, and route-shaped terms match any path-parameter spelling — a non-obvious behavior that changes how an agent should phrase 'term'. It still leaves 'root' and session/intention semantics to the schema.

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?

Opens with a specific verb+resource ('Search Go string literals in the indexed source files'), states matching semantics (case-insensitive, OR), and enumerates what is returned (file, line, literal, enclosing function). It also distinguishes itself from gograph_query and gograph_routes, so an agent can tell the three apart without opening schemas.

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?

Explicit WHEN TO USE section lists concrete target classes (route strings, URLs, SQL fragments, header names, messages) and says to prefer this over grep. Explicit NOT TO USE section names the two correct alternatives for symbols and registered routes-with-handlers, so the routing decision is fully specified.

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