Skip to main content
Glama
AdamikHQ

Adamik MCP Server

Official

broadcastTransaction

Submit signed blockchain transactions to execute operations like transfers, staking, and token conversions across multiple networks.

Instructions

Broadcast a signed transaction. You will probably need another MCP server dedicated in key management and signing before using this.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainIdYes
bodyYes

Implementation Reference

  • The handler function that executes the broadcastTransaction tool logic. It sends the signed transaction (in body) to the Adamik API broadcast endpoint via POST request and returns the JSON response as MCP content.
    async ({
      chainId,
      body,
    }: BroadcastTransactionPathParams & {
      body: BroadcastTransactionRequestBody;
    }) => {
      const result = await makeApiRequest<BroadcastTransactionResponse>(
        `${ADAMIK_API_BASE_URL}/${chainId}/transaction/broadcast`,
        ADAMIK_API_KEY,
        "POST",
        JSON.stringify(body)
      );
      const text = JSON.stringify(result);
    
      return {
        content: [
          {
            type: "text",
            text,
          },
        ],
      };
    }
  • Zod schema definitions for the broadcastTransaction tool, including path parameters (chainId), request body structure (transaction data from encode, encoded items, signature), and response (chainId, optional hash).
    export const BroadcastTransactionPathParamsSchema = z.object({
      chainId: ChainIdSchema,
    });
    export type BroadcastTransactionPathParams = z.infer<typeof BroadcastTransactionPathParamsSchema>;
    
    export const BroadcastTransactionRequestBodyTransactionSchema = z.object({
      data: EncodeTransactionResponseDataSchema, // Data from encode response
      encoded: z.array(EncodedItemSchema), // Encoded from encode response
      signature: z.string(),
    });
    
    export const BroadcastTransactionRequestBodySchema = z.object({
      transaction: BroadcastTransactionRequestBodyTransactionSchema,
    });
    export type BroadcastTransactionRequestBody = z.infer<typeof BroadcastTransactionRequestBodySchema>;
    
    export const BroadcastTransactionResponseSchema = z.object({
      chainId: ChainIdSchema,
      hash: z.string().optional(),
    });
    export type BroadcastTransactionResponse = z.infer<typeof BroadcastTransactionResponseSchema>;
  • src/module.ts:470-479 (registration)
    MCP server tool registration for 'broadcastTransaction', providing the tool name, description, and input schema (chainId and body using imported schemas).
    server.tool(
      "broadcastTransaction",
      [
        "Broadcast a signed transaction. You will probably need another MCP server dedicated in key management and signing",
        "before using this.",
      ].join(" "),
      {
        chainId: ChainIdSchema,
        body: BroadcastTransactionRequestBodySchema,
      },
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 mentions the need for external key management and signing, which adds useful context about dependencies. However, it fails to describe critical behavioral traits such as whether this is a write operation (likely yes, given 'broadcast'), potential side effects (e.g., irreversible blockchain changes), error handling, or response format. For a complex transaction tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two sentences that directly address the tool's function and a key prerequisite. It's front-loaded with the core purpose, and the second sentence adds necessary context without redundancy. There's no wasted verbiage, making it efficient for an agent to parse.

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 (broadcasting transactions with 2 parameters, nested objects, and no output schema), the description is incomplete. It lacks details on parameter semantics, behavioral outcomes, error conditions, and how it fits with sibling tools. Without annotations or an output schema, the description should provide more comprehensive guidance to help the agent use this tool correctly in a blockchain context.

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

Parameters2/5

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

The input schema has 0% description coverage, meaning parameters like 'chainId' and the nested 'body' object are undocumented. The description adds no information about what these parameters mean, their expected formats, or how they relate to broadcasting transactions. With 2 parameters and complex nested structures, the description fails to compensate for the schema's lack of documentation, leaving the agent with little guidance on how to construct valid inputs.

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: 'Broadcast a signed transaction.' It specifies the verb ('broadcast') and resource ('signed transaction'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'encodeTransaction' or 'getTransactionDetails,' which would require more specific context about when to use each.

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 provides implied usage guidance by mentioning that 'You will probably need another MCP server dedicated in key management and signing before using this,' which hints at prerequisites. However, it doesn't explicitly state when to use this tool versus alternatives like 'encodeTransaction' or clarify its role in the transaction workflow, leaving some ambiguity for the agent.

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