Skip to main content
Glama
lordbasilaiassistant-sudo

base-security-scanner-mcp

detect_rug_risk

Analyze Base mainnet tokens for rug pull risks by checking ownership, liquidity, dangerous functions, honeypot status, and contract patterns to generate a security score.

Instructions

Score rug pull risk 0-100 for a token on Base mainnet. Checks ownership, liquidity, dangerous functions, honeypot status, and contract patterns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_addressYesToken contract address on Base mainnet

Implementation Reference

  • The tool "detect_rug_risk" is registered using server.tool() in src/index.ts. It calls getTokenMetadata and computeRugScore to generate a risk profile for a token address.
    // Tool 3: detect_rug_risk
    server.tool(
      "detect_rug_risk",
      "Score rug pull risk 0-100 for a token on Base mainnet. Checks ownership, liquidity, dangerous functions, honeypot status, and contract patterns.",
      {
        token_address: z.string().describe("Token contract address on Base mainnet"),
      },
      async ({ token_address }) => {
        try {
          const metadata = await getTokenMetadata(token_address);
          const rugResult = await computeRugScore(token_address);
    
          let riskLevel = "low";
          if (rugResult.score >= 70) riskLevel = "critical";
          else if (rugResult.score >= 50) riskLevel = "high";
          else if (rugResult.score >= 30) riskLevel = "medium";
    
          return ok({
            token: token_address,
            metadata: metadata ? serializeBigInts(metadata) as Record<string, unknown> : null,
            rugScore: rugResult.score,
            riskLevel,
            factors: rugResult.factors,
          });
        } catch (err) {
          return fail(`detect_rug_risk failed: ${err instanceof Error ? err.message : String(err)}`);
        }
      }
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the risk score range (0-100) and the types of checks performed, but it lacks details on execution behavior such as rate limits, authentication needs, error handling, or whether the operation is read-only or has side effects, which are critical for a risk assessment tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and efficiently lists the checks in a single, well-structured sentence without any redundant information, making it highly concise and easy to parse.

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?

Given the tool's complexity (risk scoring with multiple checks) and the absence of annotations and output schema, the description is moderately complete. It outlines the scoring range and check types, but it lacks details on output format, error cases, or behavioral constraints, leaving gaps for an AI agent to understand full usage.

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?

The schema description coverage is 100%, so the schema already documents the token_address parameter. The description adds marginal value by specifying 'on Base mainnet' to reinforce the network context, but it does not provide additional syntax, format, or usage details beyond what the schema provides, meeting the baseline for high coverage.

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 clearly states the tool's purpose with specific verbs ('Score rug pull risk') and resources ('for a token on Base mainnet'), and it distinguishes from siblings by specifying the comprehensive risk assessment scope (ownership, liquidity, dangerous functions, etc.) that differs from more focused tools like check_honeypot or check_token_permissions.

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?

The description implies usage context by specifying 'for a token on Base mainnet' and listing the checks performed, but it does not explicitly state when to use this tool versus alternatives like check_honeypot or audit_report, nor does it provide exclusions or prerequisites for usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lordbasilaiassistant-sudo/base-security-scanner-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server