Skip to main content
Glama

scan_contract

Analyze contract text to identify risks, score severity, highlight problematic clauses, and detect missing protections for informed decision-making.

Instructions

Scan a contract for risk. Returns risk score 0-100, risky clauses, red flags, missing protections. Cost: $0.010 USDC. Service: contractscan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contract_textYes
jurisdictionNogeneral
contract_typeNo

Implementation Reference

  • The handler dynamically executes 'scan_contract' (or any other tool) by finding it in the fetched registry and invoking it via 'callTool'.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      let registry: Registry;
      try {
        registry = await fetchRegistry();
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({ error: "Failed to fetch tool registry", detail: String(error) }),
            },
          ],
        };
      }
    
      const tool = registry.tools.find((t) => t.name === name);
      if (!tool) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                error: `Tool '${name}' not found`,
                available_tools: registry.tools.map((t) => t.name),
              }),
            },
          ],
        };
      }
    
      try {
        const result = await callTool(tool, args as Record<string, unknown>);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                error: "Tool call failed",
                tool: name,
                service: tool.service,
                detail: String(error),
              }),
            },
          ],
        };
      }
    });
Behavior3/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 adds useful context about cost ('$0.010 USDC') and service provider ('contractscan'), but lacks details on permissions, rate limits, error handling, or response format. The description covers basic operation but misses deeper behavioral traits.

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 highly concise and front-loaded, with two sentences that efficiently cover purpose, outputs, cost, and service. Every element adds value without redundancy, making it easy to parse quickly.

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

Completeness2/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 analysis with 3 parameters) and lack of annotations or output schema, the description is incomplete. It omits parameter explanations, behavioral details like error cases, and output structure, leaving significant gaps for the agent to operate effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter documentation. The description fails to compensate by explaining any of the three parameters (contract_text, jurisdiction, contract_type), their formats, or semantics. This leaves all parameters undocumented, severely hindering tool invocation.

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 ('scan a contract for risk') and resources ('contract'), distinguishing it from siblings like 'scan_clause' or 'scan_competitor' by focusing on comprehensive contract risk assessment. It explicitly lists outputs (risk score, risky clauses, red flags, missing protections), making the scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'scan_clause' or 'check_compliance', nor does it mention prerequisites or exclusions. It only states what the tool does, leaving the agent to infer usage context without explicit direction.

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/yantrix-ai/yantrix-mcp'

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