Skip to main content
Glama

Protocol Risk Monitor

query_protocol_risk

Query liquidation pressure and stress scores for DeFi lending protocols. Identifies critical/high-risk accounts and total debt at risk per protocol.

Instructions

Get liquidation pressure and stress scores for DeFi lending protocols. Shows critical/high-risk account counts, health factor deterioration rate, and total debt at risk per protocol. Covers Aave V3, Compound V3, Venus, Radiant, Morpho Blue, LlamaLend, ZeroLend, MakerDAO across 6 chains. Source: Liquidationbot real-time telemetry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
windowNoTime window for aggregation (default: 1h)
networkNoFilter by blockchain network
protocolNoFilter by lending protocol
limitNoMaximum results (default 100)

Implementation Reference

  • The async handler function for query_protocol_risk. It calls apiGet to /api/v1/crypto/risk/protocols with optional window, network, protocol, and limit parameters, then formats the response as MCP text content.
    async ({ window, network, protocol, limit }) => {
      const res = await apiGet<CryptoQueryResponse>(
        "/api/v1/crypto/risk/protocols",
        {
          window: window ?? "1h",
          network,
          protocol,
          limit: limit ?? 100,
        },
      );
    
      if (!res.ok) {
        return {
          content: [
            {
              type: "text" as const,
              text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
            },
          ],
          isError: true,
        };
      }
    
      const { count, data } = res.data;
      const summary = `Found ${count} protocol risk record(s) for window=${window ?? "1h"}.`;
      const json = JSON.stringify(data, null, 2);
    
      return {
        content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
      };
    },
  • Schema registration for query_protocol_risk including inputSchema with Zod definitions for window (enum 5m/1h/24h/7d), network (6 chains), protocol (8 protocols), and limit (1-100).
    {
      title: "Protocol Risk Monitor",
      description:
        "Get liquidation pressure and stress scores for DeFi lending protocols. " +
        "Shows critical/high-risk account counts, health factor deterioration rate, " +
        "and total debt at risk per protocol. Covers Aave V3, Compound V3, Venus, " +
        "Radiant, Morpho Blue, LlamaLend, ZeroLend, MakerDAO across 6 chains. " +
        "Source: Liquidationbot real-time telemetry.",
      inputSchema: {
        window: z
          .enum(["5m", "1h", "24h", "7d"])
          .optional()
          .describe("Time window for aggregation (default: 1h)"),
        network: z
          .enum(["ethereum", "arbitrum", "polygon", "base", "bsc", "avalanche"])
          .optional()
          .describe("Filter by blockchain network"),
        protocol: z
          .enum([
            "aave_v3",
            "compound_v3",
            "venus",
            "radiant",
            "morpho_blue",
            "llamalend",
            "zerolend",
            "makerdao",
          ])
          .optional()
          .describe("Filter by lending protocol"),
        limit: z
          .number()
          .int()
          .min(1)
          .max(100)
          .optional()
          .describe("Maximum results (default 100)"),
      },
  • Registration of query_protocol_risk via server.registerTool() with name, metadata (title/description/inputSchema), and the async handler.
    server.registerTool(
      "query_protocol_risk",
      {
        title: "Protocol Risk Monitor",
        description:
          "Get liquidation pressure and stress scores for DeFi lending protocols. " +
          "Shows critical/high-risk account counts, health factor deterioration rate, " +
          "and total debt at risk per protocol. Covers Aave V3, Compound V3, Venus, " +
          "Radiant, Morpho Blue, LlamaLend, ZeroLend, MakerDAO across 6 chains. " +
          "Source: Liquidationbot real-time telemetry.",
        inputSchema: {
          window: z
            .enum(["5m", "1h", "24h", "7d"])
            .optional()
            .describe("Time window for aggregation (default: 1h)"),
          network: z
            .enum(["ethereum", "arbitrum", "polygon", "base", "bsc", "avalanche"])
            .optional()
            .describe("Filter by blockchain network"),
          protocol: z
            .enum([
              "aave_v3",
              "compound_v3",
              "venus",
              "radiant",
              "morpho_blue",
              "llamalend",
              "zerolend",
              "makerdao",
            ])
            .optional()
            .describe("Filter by lending protocol"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 100)"),
        },
      },
      async ({ window, network, protocol, limit }) => {
        const res = await apiGet<CryptoQueryResponse>(
          "/api/v1/crypto/risk/protocols",
          {
            window: window ?? "1h",
            network,
            protocol,
            limit: limit ?? 100,
          },
        );
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        const { count, data } = res.data;
        const summary = `Found ${count} protocol risk record(s) for window=${window ?? "1h"}.`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • src/index.ts:20-47 (registration)
    Import of registerCryptoTools from ./tools/crypto.js in the main entry point.
    import { registerCryptoTools } from "./tools/crypto.js";
    import { registerSanctionsTools } from "./tools/sanctions.js";
    import { registerWhaleTools } from "./tools/whales.js";
    import { registerLabelTools } from "./tools/labels.js";
    import { registerHolderTools } from "./tools/holders.js";
    import { registerDexTools } from "./tools/dex.js";
    import { registerContractTools } from "./tools/contracts.js";
    import { registerPmTools } from "./tools/pm.js";
    import { registerPmArbTools } from "./tools/pm_arb.js";
    import { registerPmResolutionTools } from "./tools/pm_resolution.js";
    import { registerEconTools } from "./tools/econ.js";
    import { registerPmMicroTools } from "./tools/pm_micro.js";
    
    function createMcpServer() {
      const server = new McpServer({
        name: "verilex-data",
        version: "0.3.3",
      });
    
      registerNpiTools(server);
      registerSecTools(server);
      registerPacerTools(server);
      registerWeatherTools(server);
      registerOtcTools(server);
      registerTrademarkTools(server);
      registerPatentTools(server);
      registerCompanyTools(server);
      registerCryptoTools(server);
  • src/index.ts:47-61 (registration)
    Call to registerCryptoTools(server) in createMcpServer() which wires up the tool registration.
      registerCryptoTools(server);
      registerSanctionsTools(server);
      registerWhaleTools(server);
      registerLabelTools(server);
      registerHolderTools(server);
      registerDexTools(server);
      registerContractTools(server);
      registerPmTools(server);
      registerPmArbTools(server);
      registerPmResolutionTools(server);
      registerEconTools(server);
      registerPmMicroTools(server);
    
      return server;
    }
Behavior3/5

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

Without annotations, the description carries the transparency burden. It states the data source (Liquidationbot real-time telemetry) but does not disclose behavioral traits like side effects, permissions, or computational cost.

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 three front-loaded sentences with no extraneous words, efficiently conveying purpose, outputs, and coverage.

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?

The description lists output metrics and coverage but lacks details on return structure (e.g., array format), which would be ideal given no output schema.

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 coverage is 100%, so the baseline is 3. The description adds context about protocols and chains covered but does not enhance parameter understanding beyond the schema's own descriptions.

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 retrieves liquidation pressure and stress scores for DeFi lending protocols, listing specific metrics, protocols, and chains, which distinguishes it from sibling tools like query_network_stress.

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 for DeFi protocol risk monitoring but lacks explicit guidance on when to use alternatives or when not to use this tool, such as for non-lending or network-level stress.

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/carrierone/verilexdata-mcp'

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