Skip to main content
Glama

create_gas_station_application

Create a Gas Station application to sponsor transaction fees for Aptos dApp users, enabling gas fee sponsorship for specified functions within your organization's project.

Instructions

Create a new Application for your Geomi Organization. Geomi is the essential toolkit for Aptos developers. This tool can be used to create a Gas Station application. Gas Station is a service that allows you to sponsor gas fees for your Aptos dApps users.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoThe description of the application.
nameYesThe name of the application. Must be between 3 and 32 characters long, with only lowercase letters, numbers, dashes and underscores.
organization_idYesThe organization id to create the api key for.
project_idYesThe project id to create the api key for.
frontend_argsNo
networkYesThe network to create the gas station application for. Can only be testnet or mainnet.
api_key_nameYesThe name of the api key to create the gas station for. This is the name of the api key that will be created for the gas station. Must be between 3 and 32 characters long, with only lowercase letters, numbers, dashes and underscores.
functionsYesA list of functions the gas station will sponsor. Each function should be in the format of <module_address>::<module_name>::<function_name>.

Implementation Reference

  • Handler function for the 'create_gas_station_application' tool. It orchestrates the creation of an application, an API key, the gas station service, and the gas station rules.
    export const createGasStationApplicationTool = {
      description:
        "Create a new Application for your Geomi Organization. Geomi is the essential toolkit for Aptos developers. This tool can be used to create a Gas Station application. Gas Station is a service that allows you to sponsor gas fees for your Aptos dApps users.",
      execute: async (
        args: {
          api_key_name: string;
          description?: string;
          frontend_args?: Parameters<typeof toApiFrontendArgs>[0];
          functions: string[];
          name: string;
          network: string;
          organization_id: string;
          project_id: string;
        },
        context: any
      ) => {
        const geomi = new Geomi(context);
        let applicationId: string | null = null;
        try {
          await recordTelemetry(
            { action: "create_gas_station_application" },
            context
          );
          // Create the application
          const application = await geomi.createApplication({
            args: {
              description: args.description ?? null,
              name: args.name,
              network: args.network,
              service_type: "Gs",
            },
            organization_id: args.organization_id,
            project_id: args.project_id,
          });
          // Store the application id so that it can be deleted if the processor creation fails.
          applicationId = application.id;
    
          // Create the API key for the Gs application
          const apiKey = await geomi.createApiKey({
            organization_id: args.organization_id,
            project_id: args.project_id,
            application_id: application.id,
            frontend_args: toApiFrontendArgs(args.frontend_args),
            name: args.api_key_name,
          });
    
          const gasStationService = new GasStation(
            context,
            args.network as "testnet" | "mainnet"
          );
    
          // Create the gas station
          const gasStation = await gasStationService.createGasStation({
            application_id: application.id,
            organization_id: args.organization_id,
            project_id: args.project_id,
          });
    
          // Create the gas station rules
          const gasStationRules = await gasStationService.createGasStationRules({
            organization_id: args.organization_id,
            project_id: args.project_id,
            application_id: application.id,
            functions: args.functions,
          });
    
          return JSON.stringify({
            application: application,
            apiKey: apiKey,
            gasStation: gasStation,
            gasStationRules: gasStationRules,
          });
        } catch (error) {
          // Delete the new application if the processor creation fails so that it's not orphaned.
          if (applicationId) {
            await geomi.deleteApplication({
              application_id: applicationId,
              organization_id: args.organization_id,
              project_id: args.project_id,
            });
          }
          return `❌ Failed to create Gas Station application: ${error}`;
        }
      },
      name: "create_gas_station_application",
      parameters: CreateGasStationApplicationToolScheme,
    };
  • Zod schema definition for the input parameters of the 'create_gas_station_application' tool.
    export const CreateGasStationApplicationToolScheme =
      CreateApiResourceApplicationToolScheme.omit({ network: true })
        .merge(CreateApiKeyToolScheme.omit({ application_id: true, name: true }))
        .extend({
          network: z
            .enum(["testnet", "mainnet"])
            .describe(
              "The network to create the gas station application for. Can only be testnet or mainnet."
            ),
          api_key_name: z
            .string()
            .describe(
              "The name of the api key to create the gas station for. This is the name of the api key that will be created for the gas station. Must be between 3 and 32 characters long, with only lowercase letters, numbers, dashes and underscores."
            ),
          functions: z
            .array(z.string())
            .describe(
              "A list of functions the gas station will sponsor. Each function should be in the format of <module_address>::<module_name>::<function_name>."
            ),
        });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool 'can be used to create a Gas Station application' but doesn't disclose important behavioral aspects: whether this is a mutating operation, what permissions are required, what happens on success/failure, whether the created application is immediately usable, or any rate limits. The description mentions what Gas Station is but not how the creation process works.

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 reasonably concise with two sentences. The first sentence directly states the tool's purpose, and the second provides context about what Gas Station is. However, the second sentence could be more tightly integrated with the first, and there's some redundancy ('Geomi is the essential toolkit for Aptos developers' could be omitted as context).

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?

For a complex creation tool with 8 parameters (6 required), no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, what happens after creation, error conditions, or practical usage scenarios. The description provides basic purpose but lacks the operational context needed for effective tool invocation given the tool's complexity.

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

Parameters3/5

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

With 88% schema description coverage, the schema already documents most parameters well. The description adds minimal value beyond the schema - it mentions creating 'a Gas Station application' which hints at the purpose of the parameters, but doesn't explain relationships between parameters (like how organization_id, project_id, and api_key_name relate) or provide usage examples. The baseline of 3 is appropriate given the high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool creates a new Gas Station application for a Geomi Organization, which is a specific verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'create_geomi_api_key' or 'create_geomi_api_resource_application' - all create different Geomi resources but the description doesn't clarify what makes a Gas Station application unique from other application types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (like needing an organization and project first), when Gas Station applications are appropriate versus other application types, or what happens after creation. The sibling tools list includes related creation tools but the description offers no differentiation.

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

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