Skip to main content
Glama

getApiSpecification

Retrieve the complete OpenAPI specification for Adamik API to access detailed schemas, formats, and rules for blockchain transactions across 80+ networks, ensuring precise API integration and error handling.

Instructions

Get the comprehensive OpenAPI specification for the Adamik API covering 80+ blockchain networks. This provides authoritative reference for: • Exact request/response schemas for all transaction types (transfer, stake, unstake, claimRewards, convertAsset, etc.) • Complete chain family details (EVM, Cosmos, Bitcoin, Solana, Starknet, etc.) with supported features • Precise parameter formats (amounts in smallest units, address formats, token IDs, validator addresses) • Transaction encoding formats (RLP, PSBT, BOC, BCS, etc.) and signature requirements • Account state schemas (native/token balances, staking positions, rewards) • Error handling patterns and validation rules • Pagination support for large datasets Use this when you need exact API contract details for blockchain operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refreshNoOptional: refresh the cached specification from API
sectionNoOptional: specific section like 'paths', 'components', 'schemas'. If not provided, returns full spec

Implementation Reference

  • Handler function that fetches (with caching) and returns the OpenAPI specification from the Adamik API endpoint, optionally filtered by section.
    async ({ section, refresh }) => { if (!cachedApiSpec || refresh) { cachedApiSpec = await makeApiRequest<any>( `${ADAMIK_API_BASE_URL.replace("/api", "")}/openapi.json`, ADAMIK_API_KEY ); } const result = section && cachedApiSpec[section] ? cachedApiSpec[section] : cachedApiSpec; return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Input parameter schema defined using Zod for optional 'section' and 'refresh' parameters.
    { section: z .string() .optional() .describe( "Optional: specific section like 'paths', 'components', 'schemas'. If not provided, returns full spec" ), refresh: z.boolean().optional().describe("Optional: refresh the cached specification from API"), },
  • src/module.ts:508-549 (registration)
    Registration of the getApiSpecification tool on the MCP server, including name, description, input schema, and handler function.
    server.tool( "getApiSpecification", [ "Get the comprehensive OpenAPI specification for the Adamik API covering 80+ blockchain networks.", "This provides authoritative reference for:", "• Exact request/response schemas for all transaction types (transfer, stake, unstake, claimRewards, convertAsset, etc.)", "• Complete chain family details (EVM, Cosmos, Bitcoin, Solana, Starknet, etc.) with supported features", "• Precise parameter formats (amounts in smallest units, address formats, token IDs, validator addresses)", "• Transaction encoding formats (RLP, PSBT, BOC, BCS, etc.) and signature requirements", "• Account state schemas (native/token balances, staking positions, rewards)", "• Error handling patterns and validation rules", "• Pagination support for large datasets", "Use this when you need exact API contract details for blockchain operations.", ].join(" "), { section: z .string() .optional() .describe( "Optional: specific section like 'paths', 'components', 'schemas'. If not provided, returns full spec" ), refresh: z.boolean().optional().describe("Optional: refresh the cached specification from API"), }, async ({ section, refresh }) => { if (!cachedApiSpec || refresh) { cachedApiSpec = await makeApiRequest<any>( `${ADAMIK_API_BASE_URL.replace("/api", "")}/openapi.json`, ADAMIK_API_KEY ); } const result = section && cachedApiSpec[section] ? cachedApiSpec[section] : cachedApiSpec; return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } );
  • In-memory cache variable used by the getApiSpecification handler to store the fetched OpenAPI specification.
    // Simple in-memory cache for the API spec let cachedApiSpec: any = null;

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