Skip to main content
Glama

deep_semantic_audit

Read-only

Stage 2 Paid ($0.015 USDC standard / $0.25 USDC deep proxy + verified source via x402 on Base Mainnet) hybrid audit combining Stage 1 on-chain gatekeeping with Stage 2 Gemini LLM evaluation to verify proposal_description claims against target_address bytecode and calldata under policy_prompt. Non-idempotent due to LLM evaluation and single-use EIP-3009 x402_payment_header nonce; omitting x402_payment_header safely returns an HTTP 402 payment challenge without charging. Breaching risk_threshold (0.0-10.0) escalates decision to REJECT. Returns JSON with status, decision (APPROVE, MANUAL_REVIEW, REJECT), risk_score, reasoning, and flagged_issues.

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": {
      "target_address": "<target_address>",
      "proposal_description": "<proposal_description>"
    },
    "name": "deep_semantic_audit"
  }
}

Input Schema

NameRequiredDescriptionDefault
calldataNoTransaction hex calldata or function selector being executed0x
chain_idNoEVM Chain ID (default: 8453 for Base Mainnet)
policy_promptNoSecurity policy or governance criteria to audit againstAudit contract and proposal for unauthorized privilege escalation, proxy upgrades, honeypot traps, or treasury drainage.
resolve_proxyNoIf true, resolves EIP-1967/1822 proxy implementation contract and inspects implementation state
risk_thresholdNoRisk score threshold (0.0 to 10.0) above which the audit triggers rejection or alert
target_addressYesHex EVM address of smart contract under evaluation
x402_payment_headerNoOptional Base64-encoded EIP-3009 transferWithAuthorization payment header satisfying $0.015 USDC (standard) or $0.25 USDC (deep proxy + verified source) requirement
proposal_descriptionYesNatural language claim or governance proposal description explaining the intent of the transaction
fetch_verified_sourceNoIf true, fetches verified Solidity source code from block explorers (Etherscan, Basescan, Sourcify)

Output Schema

NameRequiredDescriptionDefault
toolYes
stageYes
statusYes
decisionNo
reasoningNo
risk_scoreNo
llm_invokedNo
status_codeNo
flagged_issuesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / x402_payment_header / description
      Previous value: -"Optional Base64-encoded EIP-3009 transferWithAuthorization payment header satisfying $0.05 USDC requirement"New value: +"Optional Base64-encoded EIP-3009 transferWithAuthorization payment header satisfying $0.015 USDC (standard) or $0.25 USDC (deep proxy + verified source) requirement"
  2. Changed2 schema fields changed
    • addedInput schema / properties / fetch_verified_source
      Added value: +{
      +  "default": false,
      +  "description": "If true, fetches verified Solidity source code from block explorers (Etherscan, Basescan, Sourcify)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / resolve_proxy
      Added value: +{
      +  "default": false,
      +  "description": "If true, resolves EIP-1967/1822 proxy implementation contract and inspects implementation state",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "decision": {
      +      "type": "string"
      +    },
      +    "flagged_issues": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "llm_invoked": {
      +      "type": "boolean"
      +    },
      +    "reasoning": {
      +      "type": "string"
      +    },
      +    "risk_score": {
      +      "type": "number"
      +    },
      +    "stage": {
      +      "type": "integer"
      +    },
      +    "status": {
      +      "enum": [
      +        "completed",
      +        "payment_required"
      +      ],
      +      "type": "string"
      +    },
      +    "status_code": {
      +      "type": "integer"
      +    },
      +    "tool": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tool",
      +    "stage",
      +    "status"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, non-idempotent, and non-destructive behavior, but the description adds concrete operational reasons: LLM evaluation and the single-use EIP-3009 nonce make it non-idempotent, omitting the payment header returns an HTTP 402 challenge without charging, and breaching risk_threshold escalates the decision to REJECT. It also discloses pricing tiers and output fields, giving the agent a clear behavioral picture beyond the annotations.

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 dense paragraph front-loads the core purpose and payment model, and no sentence is pure filler. The parenthetical pricing and nonce details are necessary, though the density makes it somewhat harder to scan.

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 complex paid audit tool with a full output schema and rich annotations, the description covers payment mechanics, non-idempotence, threshold escalation, and return fields. Its main remaining gap is routing guidance relative to sibling tools, which is a usage-guideline concern rather than a missing behavioral fact.

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 description coverage is 100%, so the baseline is 3, but the description adds meaning by tying the x402 payment tiers to standard versus deep proxy plus verified source checks. It also clarifies that breaching risk_threshold escalates the decision to REJECT, though not every parameter is explained in prose.

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 description opens with a specific verb and resource, calling it a 'hybrid audit' and scoping it to verifying proposal_description claims against target_address bytecode and calldata under policy_prompt using Gemini LLM evaluation. That is specific enough to separate it from honeypot scanning, proxy inspection, and preflight firewall siblings even without naming them.

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?

It explains the paid Stage 2 context and the safe behavior when x402_payment_header is omitted, which is useful operational guidance. However, it never states when an agent should choose this tool over inspect_proxy_and_source, preflight_tx_firewall, or scan_dao_proposals, nor when not to use it.

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.