get_flag_registry
[SUPPORT] 45802b67 — scan a source tree for os.environ.get(...) / os.getenv(...) call sites (AST-based, not regex) and return a flat inventory of every config flag the codebase reads: {flag_name, file, line, default}. Only call sites where the flag name is a STRING LITERAL first argument are incl...
This record as markdown: /tools/io-github-ajc3xc-meridian/get-flag-registry.md
What get_flag_registry does on Meridian
AI agents call get_flag_registry to retrieve information from Meridian without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
root_dir | string | — | Absolute path to the source-tree root to scan recursively (vendored/build/cache dirs like node_modules/.git/dist/__pycache__ are pruned). Defaults to the server |
Parameters from the server's own tool schema.
Why get_flag_registry is rated Low
This tool performs static analysis of source code to extract metadata about environment variable access patterns. It has no side effects: it does not create, modify, delete, execute code, move money, or trigger external operations. It purely retrieves and inventories information from existing code. The 'best-effort' literal-eval and skipping of dynamic names confirms passive analysis.
From the tool's definition Tool description explicitly states it 'scan[s] a source tree for... and return[s] a flat inventory' of config flags. The verb 'scan' and 'return' indicate retrieval/query with no modifications.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs get_flag_registry safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Meridian, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For get_flag_registry, this is the rule to start with:
get_flag_registry is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Meridian, apply this rule, and every get_flag_registry call is checked against it from then on.
Questions about get_flag_registry
[SUPPORT] 45802b67 — scan a source tree for os.environ.get(...) / os.getenv(...) call sites (AST-based, not regex) and return a flat inventory of every config flag the codebase reads: {flag_name, file, line, default}. Only call sites where the flag name is a STRING LITERAL first argument are included — dynamic names (a variable, f-string, etc.) are skipped gracefully rather than erroring. The default is best-effort literal-eval'd from the second positional arg (or a default= keyword); a non-literal default evaluates to null. Useful for auditing config drift — 'what env flags exist, where are they read, what do they default to' — without grepping by hand. Returns {repo_root, flags:[...], count, unique_flag_names:[...], unique_count}. A missing/empty tree returns an empty flags list, never an error. It is categorised as a Read tool in the Meridian MCP Server, which means it retrieves data without modifying state.
get_flag_registry accepts 1 parameter: root_dir. The full parameter table on this page comes from the server's own tool schema.
Register the Meridian MCP server in PolicyLayer and add a rule for get_flag_registry: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Meridian. Nothing to install.
get_flag_registry is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get_flag_registry rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for get_flag_registry. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
get_flag_registry is provided by the Meridian MCP server (@meridianmcp/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Meridian, and thousands of servers like it.
This server
Across the catalogue