Skip to main content
Glama

getApiSpecification

Retrieve the OpenAPI specification for Adamik API to access exact schemas for blockchain operations across 80+ networks, including transaction formats, parameters, 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
sectionNoOptional: specific section like 'paths', 'components', 'schemas'. If not provided, returns full spec
refreshNoOptional: refresh the cached specification from API

Implementation Reference

  • The main execution logic for the getApiSpecification tool. It manages an in-memory cache of the OpenAPI spec fetched from the Adamik API endpoint, supports optional refresh, filters by section if specified, and returns the JSON stringified result.
    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), }, ], }; }
  • Zod input schema defining optional parameters: 'section' (string for specific OpenAPI section) and 'refresh' (boolean to bypass cache).
    { 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)
    The server.tool() registration call that defines the tool name, description, input schema, and references the 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 specific to the getApiSpecification tool for storing the fetched OpenAPI spec.
    // 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