Skip to main content
Glama
AdamikHQ

Adamik MCP Server

Official

getChainValidators

Retrieve the list of validators for a specific blockchain network to help users select a validator for delegation.

Instructions

Gets the list of known validators for a given chain. This is only useful when asking the user to select a validator to delegate to

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainIdYes

Implementation Reference

  • The handler function that implements the core logic: fetches validator list from Adamik API for the specified chainId, handles optional nextPage pagination, stringifies the response as text content.
    async ({ chainId, nextPage }: GetChainValidatorsPathParams & GetChainValidatorsQueryParams) => {
      const validators = await makeApiRequest<GetChainValidatorsResponse>(
        `${ADAMIK_API_BASE_URL}/${chainId}/validators${nextPage ? `?nextPage=${nextPage}` : ""}`,
        ADAMIK_API_KEY
      );
      const text = JSON.stringify(validators);
    
      return {
        content: [
          {
            type: "text",
            text,
          },
        ],
      };
    }
  • Zod schemas defining input (path/query params), output response structure, Validator and Pagination components for getChainValidators tool.
    export const ValidatorSchema = z.object({
      address: z.string(),
      name: z.string(),
      commission: z.number().optional(),
      stakedAmount: z.string().optional(),
    });
    
    export const PaginationSchema = z.object({
      nextPage: z.string().nullable(),
    });
    
    export const GetChainValidatorsPathParamsSchema = z.object({
      chainId: ChainIdSchema,
    });
    export type GetChainValidatorsPathParams = z.infer<typeof GetChainValidatorsPathParamsSchema>;
    
    export const GetChainValidatorsQueryParamsSchema = z.object({
      nextPage: z.string().optional(),
    });
    export type GetChainValidatorsQueryParams = z.infer<typeof GetChainValidatorsQueryParamsSchema>;
    
    export const GetChainValidatorsResponseSchema = z.object({
      chainId: ChainIdSchema,
      validators: z.array(ValidatorSchema),
      pagination: PaginationSchema,
    });
    export type GetChainValidatorsResponse = z.infer<typeof GetChainValidatorsResponseSchema>;
  • src/module.ts:382-404 (registration)
    Registers the getChainValidators tool on the MCP server with name, description, input parameters schema, and inline handler function.
    server.tool(
      "getChainValidators",
      "Gets the list of known validators for a given chain. This is only useful when asking the user to select a validator to delegate to",
      {
        chainId: ChainIdSchema,
      },
      async ({ chainId, nextPage }: GetChainValidatorsPathParams & GetChainValidatorsQueryParams) => {
        const validators = await makeApiRequest<GetChainValidatorsResponse>(
          `${ADAMIK_API_BASE_URL}/${chainId}/validators${nextPage ? `?nextPage=${nextPage}` : ""}`,
          ADAMIK_API_KEY
        );
        const text = JSON.stringify(validators);
    
        return {
          content: [
            {
              type: "text",
              text,
            },
          ],
        };
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'gets' data, implying a read-only operation, but doesn't mention any behavioral traits like rate limits, permissions required, pagination, or error handling. For a tool with no annotations, this leaves significant gaps in understanding how it behaves beyond its basic purpose.

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 two sentences, front-loaded with the core purpose followed by usage context. Every sentence adds value without redundancy, making it efficient and well-structured.

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 moderate complexity (1 parameter, no output schema, no annotations), the description covers purpose and usage well but lacks details on behavior and parameter semantics. It's adequate as a minimum viable description but has clear gaps, especially in transparency and parameter explanation, which are important for an agent to use it correctly.

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 input schema has 1 parameter with 0% description coverage, so the schema provides no semantic information. The description adds some context by mentioning 'for a given chain,' which implies the 'chainId' parameter identifies the chain. However, it doesn't specify format, examples, or constraints, leaving the parameter meaning partially unclear.

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 clearly states the tool's purpose: 'Gets the list of known validators for a given chain.' This is a specific verb ('gets') and resource ('list of known validators') combination. However, it doesn't explicitly distinguish this tool from potential sibling tools like 'getSupportedChains' or 'getAccountState', which keeps it from a perfect score.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: 'This is only useful when asking the user to select a validator to delegate to.' This gives the agent a specific scenario for invocation. It doesn't explicitly mention when not to use it or name alternatives among the siblings, so it falls short of a 5.

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/AdamikHQ/adamik-mcp-server'

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