Skip to main content
Glama
bmorphism

Penumbra MCP Server

get_transaction

Retrieve detailed information about a specific transaction on the Penumbra blockchain using its unique hash. Facilitates privacy-preserving transaction queries on the Penumbra MCP Server.

Instructions

Get details of a specific transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesTransaction hash

Implementation Reference

  • The main handler function that executes the get_transaction tool logic, fetching transaction details by hash (currently mock data).
    private async getTransaction(hash: string) {
      try {
        // TODO: Implement actual transaction query
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                hash,
                status: "success",
                height: "1000000",
                timestamp: new Date().toISOString(),
                gasUsed: "50000",
                fee: "0.001"
              }, null, 2),
            },
          ],
        };
      } catch (error: unknown) {
        const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching transaction: ${errorMessage}`,
            },
          ],
          isError: true,
        };
      }
    }
  • src/index.ts:113-126 (registration)
    Registration of the get_transaction tool in the ListTools response, including name, description, and input schema.
    {
      name: 'get_transaction',
      description: 'Get details of a specific transaction',
      inputSchema: {
        type: 'object',
        properties: {
          hash: {
            type: 'string',
            description: 'Transaction hash',
          },
        },
        required: ['hash'],
      },
    },
  • Input schema defining the expected parameters for the get_transaction tool (hash: string).
    inputSchema: {
      type: 'object',
      properties: {
        hash: {
          type: 'string',
          description: 'Transaction hash',
        },
      },
      required: ['hash'],
    },
  • Dispatch handler in CallToolRequestSchema that validates input and calls the getTransaction method.
    case 'get_transaction':
      if (!request.params.arguments?.hash || typeof request.params.arguments.hash !== 'string') {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Transaction hash must be a string'
        );
      }
      return await this.getTransaction(request.params.arguments.hash);
    case 'get_dex_state':
Install Server

Other Tools

Related 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/bmorphism/penumbra-mcp'

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