Skip to main content
Glama

create_aptos_project

Initialize a new Aptos blockchain project with specified name and type using Aptos CLI commands.

Instructions

Create a new Aptos project using the Aptos CLI.

Args:
    project_name: Name of the project
    project_type: Type of project (fullstack, contract, client)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_nameYes
project_typeNofullstack

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the create_aptos_project tool. It validates the project_type, constructs an Aptos CLI command to initialize a new project, executes it via subprocess, and returns success or error messages.
    @mcp.tool()
    async def create_aptos_project(project_name: str, project_type: str = "fullstack") -> str:
        """
        Create a new Aptos project using the Aptos CLI.
        
        Args:
            project_name: Name of the project
            project_type: Type of project (fullstack, contract, client)
        """
        supported_types = ["fullstack", "contract", "client"]
        if project_type not in supported_types:
            return f"Unsupported project type. Choose from: {', '.join(supported_types)}"
        
        # Command to generate project
        cmd = ["npx", "@aptos-labs/aptos-cli@latest", "init", project_name, "--type", project_type]
        
        try:
            result = subprocess.run(cmd, capture_output=True, text=True, check=True)
            return f"Successfully created {project_type} project '{project_name}'.\n\n{result.stdout}"
        except subprocess.CalledProcessError as e:
            return f"Error creating project: {e.stderr}"
        except Exception as e:
            return f"Error: {str(e)}"
  • The @mcp.tool() decorator registers the create_aptos_project function as an MCP tool.
    @mcp.tool()
  • Docstring providing tool description and parameter documentation, serving as input schema.
    """
    Create a new Aptos project using the Aptos CLI.
    
    Args:
        project_name: Name of the project
        project_type: Type of project (fullstack, contract, client)
    """
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Create' which implies a write operation, but lacks details on permissions, side effects, error handling, or output format. This is insufficient for a mutation tool with zero annotation coverage.

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

Conciseness5/5

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

The description is front-loaded with the core purpose, followed by a clear parameter breakdown in a structured format. Every sentence earns its place with no wasted words, making it highly efficient and easy 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 (a mutation operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It fails to address critical aspects like behavioral traits, usage context, or return values, leaving significant gaps for an AI agent.

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?

The description adds value by explaining the semantics of both parameters (project_name and project_type with its allowed values), which compensates for the 0% schema description coverage. However, it doesn't provide deeper context like format constraints or examples, keeping it at a baseline level.

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 verb 'Create' and the resource 'new Aptos project using the Aptos CLI', which is specific and actionable. However, it doesn't explicitly distinguish this tool from its siblings (e.g., create_aptos_indexer, create_gas_station), which prevents a perfect score.

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, nor does it mention prerequisites or context for usage. It simply states what the tool does without indicating appropriate scenarios or exclusions.

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/Tlazypanda/aptos-mcp-server'

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