Skip to main content
Glama

get_specific_aptos_resource

Retrieve Aptos development resources by exact filename to access specific blockchain integration guides and documentation.

Instructions

Retrieve a specific Aptos development resource by its exact filename (without .md extension).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesExact filename of the resource (e.g., 'how_to_add_wallet_connection', 'how_to_config_a_full_node_api_key_in_a_dapp', 'how_to_integrate_fungible_asset')

Implementation Reference

  • The handler function for the 'get_specific_aptos_resource' tool. It validates the existence of the requested resource and reads it from the 'how_to' directory.
    execute: async (args) => {
      const { filename } = args;
      const availableFiles = getAvailableHowToResources();
    
      if (!availableFiles.includes(filename)) {
        return {
          text: `Resource '${filename}' not found. Available resources:\n${availableFiles.join("\n")}`,
          type: "text",
        };
      }
    
      const content = await readMarkdownFromDirectory("how_to", filename);
      return {
        text: content,
        type: "text",
      };
    },
  • Input schema definition for the 'get_specific_aptos_resource' tool.
    parameters: z.object({
      filename: z
        .string()
        .describe(
          "Exact filename of the resource (e.g., 'how_to_add_wallet_connection', 'how_to_config_a_full_node_api_key_in_a_dapp', 'how_to_integrate_fungible_asset')"
        ),
    }),
  • src/server.ts:108-136 (registration)
    Tool registration for 'get_specific_aptos_resource' using the server instance.
    server.addTool({
      description:
        "Retrieve a specific Aptos development resource by its exact filename (without .md extension).",
      execute: async (args) => {
        const { filename } = args;
        const availableFiles = getAvailableHowToResources();
    
        if (!availableFiles.includes(filename)) {
          return {
            text: `Resource '${filename}' not found. Available resources:\n${availableFiles.join("\n")}`,
            type: "text",
          };
        }
    
        const content = await readMarkdownFromDirectory("how_to", filename);
        return {
          text: content,
          type: "text",
        };
      },
      name: "get_specific_aptos_resource",
      parameters: z.object({
        filename: z
          .string()
          .describe(
            "Exact filename of the resource (e.g., 'how_to_add_wallet_connection', 'how_to_config_a_full_node_api_key_in_a_dapp', 'how_to_integrate_fungible_asset')"
          ),
      }),
    });

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/aptos-labs/aptos-npm-mcp'

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