Skip to main content
Glama
code-alchemist01

MCP Cloud Services Server

stop_resource

Stop cloud resources like instances or functions on AWS, Azure, or GCP to manage costs and control resource usage.

Instructions

Stop a cloud resource

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerYesCloud provider
resourceIdYesResource ID to stop
resourceTypeYesResource type

Implementation Reference

  • The core handler logic for the 'stop_resource' tool within the switch statement of handleResourceManagementTool. It extracts resourceId and resourceType, checks if it's an AWS EC2 instance, calls AWSAdapter.stopEC2Instance if supported, returns success message, otherwise throws an implementation-not-found error.
    case 'stop_resource': {
      const resourceId = params.resourceId as string;
      const resourceType = params.resourceType as string;
    
      if (provider === 'aws' && resourceType === 'instance') {
        const adapter = new AWSAdapter();
        await adapter.stopEC2Instance(resourceId);
        return { success: true, message: `Instance ${resourceId} stopped` };
      }
      throw new Error(`Stop operation not yet implemented for ${provider} ${resourceType}`);
    }
  • Tool metadata and input schema definition for 'stop_resource', specifying parameters for cloud provider, resource ID, and type (instance or function). This object is part of the exported resourceManagementTools array.
    {
      name: 'stop_resource',
      description: 'Stop a cloud resource',
      inputSchema: {
        type: 'object',
        properties: {
          provider: {
            type: 'string',
            enum: ['aws', 'azure', 'gcp'],
            description: 'Cloud provider',
          },
          resourceId: {
            type: 'string',
            description: 'Resource ID to stop',
          },
          resourceType: {
            type: 'string',
            enum: ['instance', 'function'],
            description: 'Resource type',
          },
        },
        required: ['provider', 'resourceId', 'resourceType'],
      },
    },
  • src/server.ts:19-27 (registration)
    Includes resourceManagementTools (containing 'stop_resource' schema) in the complete allTools array, which is returned in ListToolsResponse for MCP clients to discover available tools.
    const allTools = [
      ...awsTools,
      ...azureTools,
      ...gcpTools,
      ...resourceManagementTools,
      ...costAnalysisTools,
      ...monitoringTools,
      ...securityTools,
    ];
  • src/server.ts:70-71 (registration)
    Dispatch routing in the MCP server's CallToolRequest handler: checks if the tool name matches one in resourceManagementTools and invokes handleResourceManagementTool, which contains the stop_resource case.
    } else if (resourceManagementTools.some((t) => t.name === name)) {
      result = await handleResourceManagementTool(name, args || {});
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. 'Stop a cloud resource' implies a state change operation but reveals nothing about permissions required, whether the stop is reversible, what happens to associated resources, error conditions, or response format. For a potentially destructive operation with zero annotation coverage, this is inadequate.

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 a single, efficient sentence with zero wasted words. It's appropriately sized for a tool with three straightforward parameters and gets directly to the point without unnecessary elaboration.

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 tool that performs state changes on cloud resources with no annotations and no output schema, the description is insufficient. It doesn't address critical context like what 'stop' means for different resource types, whether data is preserved, authentication requirements, or error handling. The description should provide more operational context 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?

Schema description coverage is 100%, so all parameters are documented in the schema itself. The description adds no additional parameter information beyond what's already in the structured schema. This meets the baseline expectation when schema coverage is complete.

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 'Stop a cloud resource' clearly states the action (stop) and target (cloud resource), providing a specific verb+resource combination. However, it doesn't distinguish this generic tool from its more specific sibling 'aws_stop_ec2_instance', which handles the same action for a specific provider/resource type combination.

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. With multiple sibling tools like 'aws_stop_ec2_instance', 'delete_resource', and 'start_resource', there's no indication of when this generic stop tool is preferred over provider-specific tools or how it differs from deletion operations.

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/code-alchemist01/Cloud-mcp_server'

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