Skip to main content
Glama

unbounded_consumption_auditor__scan_text

Scans LLM and agent application code for unbounded consumption risks, including missing output token limits, timeouts, iteration caps, and rate limits, to prevent denial-of-wallet exposure.

Instructions

Scan LLM/agent application code for Unbounded Consumption ("denial of wallet") anti-patterns from OWASP LLM Top 10 2025's LLM10 category: LLM calls with no output token limit, hand-rolled HTTP calls to an LLM endpoint with no timeout, agent tool-calling or retry loops with no iteration cap, framework safety limits (LangChain max_iterations, openai-agents max_turns) explicitly disabled, and MCP tool handlers that make billable calls with no visible rate limiting.

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": {
      "content": "<content>"
    },
    "name": "unbounded_consumption_auditor__scan_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNoOptional label shown in findings (e.g. filename)
contentYesThe code content to scan

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.5
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv0.1.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It lists detection targets well but says nothing about the operation's side effects (read-only static analysis vs. executing the code), whether any LLM calls are made, what the findings contain (severity, line numbers, evidence snippets), or any limits on input size. For a tool with zero annotation coverage this leaves important behavioral questions open.

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?

A single front-loaded sentence: the purpose and threat category come first, followed by the concrete pattern list. The enumeration is dense but each item earns its place by tightening scope; only the OWASP category citation is arguably superfluous.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter static scanner with no output schema and no annotations, the description covers what is detected but not what is returned, whether the input is a snippet or a full file, or the limitations of the analysis. Adequate to select the tool, incomplete for setting expectations on results.

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% for both parameters ('content' and 'label'), so the schema already defines them fully. The description adds no parameter-level detail such as accepted languages, size limits, or how 'label' appears in findings, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb (scan) plus a specific resource (LLM/agent application code) and enumerates exactly which anti-patterns are detected: missing output token limits, hand-rolled HTTP calls without timeout, uncapped agent/retry loops, disabled framework limits, and unrated MCP billable calls. It does not, however, name the near-identical siblings (scan_file, scan_directory) or state that this variant takes raw code text rather than a path, so an agent must infer the distinction from the name alone.

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 implied by the description of what is detected, but there is no explicit when-to-use statement, no exclusion rules, and no routing guidance such as 'use this when you already have code as a string; use scan_file for a path.' The agent must guess from the tool name.

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

Deploy Server

Other Tools