Skip to main content
Glama

deploy

Deploy Python scripts to Modal from Claude to create shareable web applications. Get a link to your deployed app for collaboration.

Instructions

some description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modal_pathNo

Implementation Reference

  • Core handler function for the 'deploy' tool that executes the Modal CLI deploy command via subprocess and returns the result.
    def deploy(modal_path: str = "model_app.py") -> str:
        """
        Deploy a model using Modal CLI command.
    
        Args:
            modal_path: Path to the modal file to deploy
    
        Returns:
            str: deployment result
        """
        try:
            # Run modal deploy command
            process = subprocess.run(["modal", "deploy", modal_path], capture_output=True, text=True)
            
            # Check if the command was successful
            if process.returncode == 0:
                return f"Deploy success: {process.stdout}"
            else:
                raise RuntimeError(f"Deploy failed: {process.stderr}")
            # if process.returncode == 0:
            #     message = f"Deployment successful: {stdout.decode()}"
            # else:
            #     message = f"Deployment failed: {stderr.decode()}"
            # return message
        except Exception as e:
            return f"Deployment error: {str(e)}"
  • Registration of the 'deploy' tool in the list_tools() method, including its name, description, and input schema.
        Tool(
            name="deploy",
            description="some description",
            inputSchema={
                "type": "object",
                "properties": {
                    "modal_path": {"type": "string"},
                },
                "required": ["message"],
            },
        )
    ]
  • Dispatch logic in the call_tool() handler specifically for the 'deploy' tool, which validates arguments, calls the deploy function, and formats the response.
    if name != "deploy":
        raise ValueError(f"Unknown tool: {name}")
    if not isinstance(arguments, dict) or "modal_path" not in arguments:
        raise ValueError("Invalid forecast arguments")
    modal_path = arguments["modal_path"]
    
    try:
        res = deploy(modal_path)
        return [
            TextContent(type="text", text=json.dumps(f"Deploy result: {res}", indent=2))
        ]
    except httpx.HTTPError as e:
  • JSON Schema defining the input for the 'deploy' tool (note: required field mismatch with properties).
    inputSchema={
        "type": "object",
        "properties": {
            "modal_path": {"type": "string"},
        },
        "required": ["message"],
    },
Behavior1/5

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

No annotations are provided, so the description carries full responsibility for behavioral disclosure. 'some description' reveals nothing about whether this is a read/write operation, what permissions are needed, side effects, rate limits, or response format. It's completely inadequate for a tool with a potentially significant action like 'deploy'.

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

Conciseness2/5

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

While technically concise with just two words, this is a case of harmful under-specification rather than effective brevity. The description fails to communicate any meaningful information, so its conciseness doesn't serve the purpose of helping an AI agent understand the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool named 'deploy' with one required parameter, no annotations, no output schema, and 0% schema coverage, the description 'some description' is completely inadequate. It provides no information about what gets deployed, to where, with what consequences, or what the parameter means. This leaves the agent with essentially no usable information.

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

Parameters1/5

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

Schema description coverage is 0%, meaning the single parameter 'modal_path' is completely undocumented in the schema. The description 'some description' adds zero information about what this parameter means, what format it expects, or how it influences the deployment. This leaves the parameter entirely unexplained.

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

Purpose1/5

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

The description 'some description' is a tautology that merely restates the tool name 'deploy' without specifying what it actually does. It provides no verb, resource, or scope information, making it completely uninformative about the tool's purpose.

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

Usage Guidelines1/5

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

The description offers no guidance on when to use this tool, what context it applies to, or any prerequisites. With no sibling tools mentioned, there's no need for differentiation, but the description fails to provide even basic usage context.

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/Flux159/mcp-server-modal'

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