Skip to main content
Glama

gograph_envs

Read-onlyIdempotent

Find all environment variable reads in a Go codebase via os.Getenv, os.LookupEnv, or config frameworks. Filter by key to document required vars or audit secrets.

Instructions

Find all environment variable reads in the codebase via os.Getenv, os.LookupEnv, and common config frameworks, with their enclosing function context. The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. Optional term filters by key name substring (e.g., "DATABASE" matches DATABASE_URL and DATABASE_HOST). WHEN TO USE: When compiling a deployment configuration manifest, documenting required env vars, or auditing what secrets a service reads at startup. NOT TO USE: For reading actual runtime env values (this is static analysis); for database queries (use gograph_sql). RETURNS: List of env key names, calling function, and file/line; empty when no env reads match the filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termNoOptional filter term (e.g., 'DATABASE' matches DATABASE_URL, DATABASE_HOST, etc.)
limitNoMaximum rows per page; the byte budget may return fewer.
cursorNoOpaque next_cursor for the same graph snapshot and result selection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.5
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Opaque next_cursor for the same graph snapshot and result selection.",
      +  "maxLength": 128,
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 100,
      +  "description": "Maximum rows per page; the byte budget may return fewer.",
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. Addedv1.5.3
  3. Removedv1.5.3
  4. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new context beyond the annotations: the freshness check before the call, mode-dependent CHA/SSA retry after source changes, and an empty-list return when no reads match. It restates 'read-only; no side effects' (redundant with annotations) but the freshness/retry disclosure is substantive.

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?

Well front-loaded: purpose first, then behavior, then labeled WHEN TO USE / NOT TO USE / RETURNS sections. It runs somewhat long and the term example duplicates the schema, but every section maps to a decision the agent must make, so there is little waste.

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?

With no output schema, the description carries the return-value burden and does so (key names, calling function, file/line, empty case). Combined with freshness/retry behavior and full parameter coverage, an agent has what it needs; only the limit/cursor pagination interplay is left entirely to the schema.

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%, so all three parameters are documented in the schema itself (term with the DATABASE example, limit as rows-per-page with byte budget, cursor as opaque next_cursor). The description largely repeats the term example and adds no semantics for limit or cursor, so the baseline 3 for full schema coverage is correct.

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?

States a specific verb (find) and resource (environment variable reads) and enumerates the exact detection mechanisms (os.Getenv, os.LookupEnv, config frameworks) plus enclosing function context. An agent can distinguish this from siblings like gograph_globals or gograph_literals without opening either schema.

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 (deployment manifest, documenting required env vars, auditing secrets) and NOT TO USE clauses, including a named alternative (gograph_sql for database queries) and the clarification that this is static, not runtime, analysis. Routing is unambiguous.

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