Skip to main content
Glama
hidenorigoto

Sakura Cloud MCP Server

by hidenorigoto

get_server_info

Retrieve detailed server information from Sakura Cloud infrastructure by specifying the server ID and optional zone.

Instructions

Get detailed information about a specific server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverIdYesThe ID of the server to retrieve
zoneNoThe zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.

Implementation Reference

  • Executes the get_server_info tool by validating credentials, extracting serverId and optional zone, fetching server details from Sakura Cloud API, and returning JSON-formatted response.
    if (request.params.name === 'get_server_info') {
      try {
        validateCredentials();
        
        const serverId = request.params.arguments?.serverId as string;
        if (!serverId) {
          throw new Error('Server ID is required');
        }
        
        const zone = request.params.arguments?.zone as string || DEFAULT_ZONE;
        const serverInfo = await fetchFromSakuraCloud(`/server/${serverId}`, false, zone);
        
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(serverInfo, null, 2)
            }
          ]
        };
      } catch (error) {
        console.error('Error calling tool:', error);
        throw error;
      }
    } else if (request.params.name === 'get_server_list') {
  • Defines the input schema for the get_server_info tool, specifying serverId as required string and optional zone string.
    name: 'get_server_info',
    description: 'Get detailed information about a specific server',
    inputSchema: {
      type: 'object',
      properties: {
        serverId: {
          type: 'string',
          description: 'The ID of the server to retrieve'
        },
        zone: {
          type: 'string',
          description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
        }
      },
      required: ['serverId']
    }
  • Core helper function used by get_server_info to make authenticated HTTPS requests to Sakura Cloud API endpoints.
    async function fetchFromSakuraCloud(path: string, isPublicAPI: boolean = false, zone: string = DEFAULT_ZONE, method: string = 'GET', bodyData?: any): Promise<any> {
      return new Promise((resolve, reject) => {
        const basePath = isPublicAPI ? '/cloud/api/cloud/1.1' : `/cloud/zone/${zone}/api/cloud/1.1`;
        
        const options = {
          hostname: 'secure.sakura.ad.jp',
          port: 443,
          path: `${basePath}${path}`,
          method: method,
          headers: {
            'Accept': 'application/json',
            'Authorization': '',
            'Content-Type': 'application/json'
          }
        };
        
        // Add authorization for non-public APIs
        if (!isPublicAPI) {
          options.headers['Authorization'] = `Basic ${Buffer.from(`${SACLOUD_API_TOKEN}:${SACLOUD_API_SECRET}`).toString('base64')}`;
        }
    
        const req = https.request(options, (res) => {
          let data = '';
          
          res.on('data', (chunk) => {
            data += chunk;
          });
          
          res.on('end', () => {
            try {
              if (data) {
                const parsedData = JSON.parse(data);
                resolve(parsedData);
              } else {
                resolve({});
              }
            } catch (err) {
              reject(new Error(`Failed to parse response: ${err}`));
            }
          });
        });
        
        req.on('error', (error) => {
          reject(error);
        });
        
        if (bodyData && (method === 'POST' || method === 'PUT')) {
          req.write(JSON.stringify(bodyData));
        }
        
        req.end();
      });
    }
  • Validates presence of required Sakura Cloud API credentials before making API calls in get_server_info handler.
    function validateCredentials(): void {
      if (!SACLOUD_API_TOKEN || !SACLOUD_API_SECRET) {
        throw new Error('Missing API credentials. Set SACLOUD_API_TOKEN and SACLOUD_API_SECRET environment variables.');
      }
    }
  • src/server.ts:739-1424 (registration)
    Registers the get_server_info tool in the ListTools response, making it discoverable by MCP clients.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: 'get_server_info',
            description: 'Get detailed information about a specific server',
            inputSchema: {
              type: 'object',
              properties: {
                serverId: {
                  type: 'string',
                  description: 'The ID of the server to retrieve'
                },
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
              required: ['serverId']
            }
          },
          {
            name: 'get_server_list',
            description: 'Get list of servers',
            inputSchema: {
              type: 'object',
              properties: {
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
            }
          },
          {
            name: 'get_switch_list',
            description: 'Get list of switches',
            inputSchema: {
              type: 'object',
              properties: {
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
            }
          },
          {
            name: 'get_switch_info',
            description: 'Get detailed information about a specific switch',
            inputSchema: {
              type: 'object',
              properties: {
                switchId: {
                  type: 'string',
                  description: 'The ID of the switch to retrieve'
                },
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
              required: ['switchId']
            }
          },
          {
            name: 'get_appliance_list',
            description: 'Get list of appliances',
            inputSchema: {
              type: 'object',
              properties: {
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
            }
          },
          {
            name: 'get_appliance_info',
            description: 'Get detailed information about a specific appliance',
            inputSchema: {
              type: 'object',
              properties: {
                applianceId: {
                  type: 'string',
                  description: 'The ID of the appliance to retrieve'
                }
              },
              required: ['applianceId']
            }
          },
          {
            name: 'get_disk_list',
            description: 'Get list of disks',
            inputSchema: {
              type: 'object',
              properties: {
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
            }
          },
          {
            name: 'get_disk_info',
            description: 'Get detailed information about a specific disk',
            inputSchema: {
              type: 'object',
              properties: {
                diskId: {
                  type: 'string',
                  description: 'The ID of the disk to retrieve'
                },
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
              required: ['diskId']
            }
          },
          {
            name: 'get_archive_list',
            description: 'Get list of archives',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_archive_info',
            description: 'Get detailed information about a specific archive',
            inputSchema: {
              type: 'object',
              properties: {
                archiveId: {
                  type: 'string',
                  description: 'The ID of the archive to retrieve'
                }
              },
              required: ['archiveId']
            }
          },
          {
            name: 'get_cdrom_list',
            description: 'Get list of ISO images',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_cdrom_info',
            description: 'Get detailed information about a specific ISO image',
            inputSchema: {
              type: 'object',
              properties: {
                cdromId: {
                  type: 'string',
                  description: 'The ID of the ISO image to retrieve'
                }
              },
              required: ['cdromId']
            }
          },
          {
            name: 'get_bridge_list',
            description: 'Get list of bridges',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_bridge_info',
            description: 'Get detailed information about a specific bridge',
            inputSchema: {
              type: 'object',
              properties: {
                bridgeId: {
                  type: 'string',
                  description: 'The ID of the bridge to retrieve'
                }
              },
              required: ['bridgeId']
            }
          },
          {
            name: 'get_router_list',
            description: 'Get list of routers',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_router_info',
            description: 'Get detailed information about a specific router',
            inputSchema: {
              type: 'object',
              properties: {
                routerId: {
                  type: 'string',
                  description: 'The ID of the router to retrieve'
                }
              },
              required: ['routerId']
            }
          },
          {
            name: 'get_interface_list',
            description: 'Get list of network interfaces',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_interface_info',
            description: 'Get detailed information about a specific network interface',
            inputSchema: {
              type: 'object',
              properties: {
                interfaceId: {
                  type: 'string',
                  description: 'The ID of the interface to retrieve'
                }
              },
              required: ['interfaceId']
            }
          },
          {
            name: 'get_icon_list',
            description: 'Get list of icons',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_icon_info',
            description: 'Get detailed information about a specific icon',
            inputSchema: {
              type: 'object',
              properties: {
                iconId: {
                  type: 'string',
                  description: 'The ID of the icon to retrieve'
                }
              },
              required: ['iconId']
            }
          },
          {
            name: 'get_note_list',
            description: 'Get list of notes and startup scripts',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_note_info',
            description: 'Get detailed information about a specific note or startup script',
            inputSchema: {
              type: 'object',
              properties: {
                noteId: {
                  type: 'string',
                  description: 'The ID of the note to retrieve'
                }
              },
              required: ['noteId']
            }
          },
          {
            name: 'get_sshkey_list',
            description: 'Get list of SSH keys',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_sshkey_info',
            description: 'Get detailed information about a specific SSH key',
            inputSchema: {
              type: 'object',
              properties: {
                sshkeyId: {
                  type: 'string',
                  description: 'The ID of the SSH key to retrieve'
                }
              },
              required: ['sshkeyId']
            }
          },
          {
            name: 'get_region_list',
            description: 'Get list of regions',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_region_info',
            description: 'Get detailed information about a specific region',
            inputSchema: {
              type: 'object',
              properties: {
                regionId: {
                  type: 'string',
                  description: 'The ID of the region to retrieve'
                }
              },
              required: ['regionId']
            }
          },
          {
            name: 'get_zone_list',
            description: 'Get list of zones',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_zone_info',
            description: 'Get detailed information about a specific zone',
            inputSchema: {
              type: 'object',
              properties: {
                zoneId: {
                  type: 'string',
                  description: 'The ID of the zone to retrieve'
                }
              },
              required: ['zoneId']
            }
          },
          {
            name: 'get_product_info',
            description: 'Get detailed information about specific product offerings',
            inputSchema: {
              type: 'object',
              properties: {
                productType: {
                  type: 'string',
                  description: 'The type of product to retrieve (server, disk, internet, license)',
                  enum: ['server', 'disk', 'internet', 'license']
                }
              },
              required: ['productType']
            }
          },
          {
            name: 'get_commonserviceitem_list',
            description: 'Get list of common service items (DNS, Simple Monitor, etc.)',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_commonserviceitem_info',
            description: 'Get detailed information about a specific common service item',
            inputSchema: {
              type: 'object',
              properties: {
                itemId: {
                  type: 'string',
                  description: 'The ID of the common service item to retrieve'
                }
              },
              required: ['itemId']
            }
          },
          {
            name: 'get_license_list',
            description: 'Get list of licenses',
            inputSchema: {
              type: 'object',
              properties: {
              },
            }
          },
          {
            name: 'get_license_info',
            description: 'Get detailed information about a specific license',
            inputSchema: {
              type: 'object',
              properties: {
                licenseId: {
                  type: 'string',
                  description: 'The ID of the license to retrieve'
                }
              },
              required: ['licenseId']
            }
          },
          {
            name: 'get_bill_info',
            description: 'Get billing information for a specific month',
            inputSchema: {
              type: 'object',
              properties: {
                year: {
                  type: 'string',
                  description: 'The year (YYYY) of the billing period'
                },
                month: {
                  type: 'string',
                  description: 'The month (MM) of the billing period'
                }
              },
              required: ['year', 'month']
            }
          },
          {
            name: 'get_bill_detail',
            description: 'Get detailed billing information for a specific month',
            inputSchema: {
              type: 'object',
              properties: {
                year: {
                  type: 'string',
                  description: 'The year (YYYY) of the billing period'
                },
                month: {
                  type: 'string',
                  description: 'The month (MM) of the billing period'
                }
              },
              required: ['year', 'month']
            }
          },
          {
            name: 'get_coupon_info',
            description: 'Get information about a specific coupon',
            inputSchema: {
              type: 'object',
              properties: {
                couponId: {
                  type: 'string',
                  description: 'The ID of the coupon to retrieve'
                }
              },
              required: ['couponId']
            }
          },
          {
            name: 'get_privatehost_info',
            description: 'Get detailed information about a specific private host',
            inputSchema: {
              type: 'object',
              properties: {
                privateHostId: {
                  type: 'string',
                  description: 'The ID of the private host to retrieve'
                }
              },
              required: ['privateHostId']
            }
          },
          {
            name: 'get_public_price',
            description: 'Get public pricing information for Sakura Cloud services',
            inputSchema: {
              type: 'object',
              properties: {}
            }
          },
          {
            name: 'get_apprun_list',
            description: 'Get list of all AppRun applications',
            inputSchema: {
              type: 'object',
              properties: {
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              }
            }
          },
          {
            name: 'get_apprun_info',
            description: 'Get detailed information about a specific AppRun application',
            inputSchema: {
              type: 'object',
              properties: {
                appId: {
                  type: 'string',
                  description: 'The ID of the AppRun application to retrieve'
                },
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
              required: ['appId']
            }
          },
          {
            name: 'create_apprun',
            description: 'Create a new AppRun application',
            inputSchema: {
              type: 'object',
              properties: {
                name: {
                  type: 'string',
                  description: 'Name of the AppRun application'
                },
                description: {
                  type: 'string',
                  description: 'Description of the AppRun application'
                },
                dockerImage: {
                  type: 'string',
                  description: 'Docker image to use for the AppRun application'
                },
                planId: {
                  type: 'string',
                  description: 'Plan ID for the AppRun application'
                },
                environment: {
                  type: 'array',
                  description: 'Environment variables for the AppRun application',
                  items: {
                    type: 'object',
                    properties: {
                      key: { type: 'string' },
                      value: { type: 'string' }
                    }
                  }
                },
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
              required: ['name', 'dockerImage', 'planId']
            }
          },
          {
            name: 'delete_apprun',
            description: 'Delete an AppRun application',
            inputSchema: {
              type: 'object',
              properties: {
                appId: {
                  type: 'string',
                  description: 'The ID of the AppRun application to delete'
                },
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
              required: ['appId']
            }
          },
          {
            name: 'start_apprun',
            description: 'Start an AppRun application',
            inputSchema: {
              type: 'object',
              properties: {
                appId: {
                  type: 'string',
                  description: 'The ID of the AppRun application to start'
                },
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
              required: ['appId']
            }
          },
          {
            name: 'stop_apprun',
            description: 'Stop an AppRun application',
            inputSchema: {
              type: 'object',
              properties: {
                appId: {
                  type: 'string',
                  description: 'The ID of the AppRun application to stop'
                },
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
              required: ['appId']
            }
          },
          {
            name: 'update_apprun',
            description: 'Update an existing AppRun application',
            inputSchema: {
              type: 'object',
              properties: {
                appId: {
                  type: 'string',
                  description: 'The ID of the AppRun application to update'
                },
                name: {
                  type: 'string',
                  description: 'New name of the AppRun application'
                },
                description: {
                  type: 'string',
                  description: 'New description of the AppRun application'
                },
                dockerImage: {
                  type: 'string',
                  description: 'New Docker image to use for the AppRun application'
                },
                planId: {
                  type: 'string',
                  description: 'New plan ID for the AppRun application'
                },
                environment: {
                  type: 'array',
                  description: 'New environment variables for the AppRun application',
                  items: {
                    type: 'object',
                    properties: {
                      key: { type: 'string' },
                      value: { type: 'string' }
                    }
                  }
                },
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
              required: ['appId']
            }
          },
          {
            name: 'get_apprun_logs',
            description: 'Get logs from an AppRun application',
            inputSchema: {
              type: 'object',
              properties: {
                appId: {
                  type: 'string',
                  description: 'The ID of the AppRun application to get logs from'
                },
                offset: {
                  type: 'number',
                  description: 'Offset to start fetching logs from (default: 0)'
                },
                limit: {
                  type: 'number',
                  description: 'Maximum number of log entries to fetch (default: 100)'
                },
                zone: {
                  type: 'string',
                  description: 'The zone to use (e.g., "tk1v", "is1a", "tk1a"). Defaults to "tk1v" if not specified.'
                }
              },
              required: ['appId']
            }
          }
        ]
      };
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Get' implies a read operation, it doesn't specify authentication requirements, rate limits, error conditions, or what 'detailed information' includes (e.g., status, configuration, metrics). For a tool with no annotation coverage, this leaves significant behavioral gaps.

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 that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple retrieval operation and front-loads the essential information.

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

Completeness3/5

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

For a read operation with no output schema and no annotations, the description is minimally adequate but incomplete. It identifies the resource but doesn't cover return format, error handling, or differentiation from similar tools. Given the context of many sibling tools and no structured output documentation, more completeness would be beneficial.

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 the schema fully documents both parameters (serverId and zone). The description adds no additional parameter semantics beyond implying retrieval of a specific server, which is already clear from the schema. Baseline 3 is appropriate when the schema does all the parameter documentation work.

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 ('Get') and resource ('detailed information about a specific server'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get_server_list' or 'get_appliance_info', which would require specifying what makes server information distinct from other get_info operations.

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 many sibling 'get_info' tools (e.g., get_appliance_info, get_zone_info), there's no indication of what distinguishes server information from other entity types or when to prefer this over general listing tools like get_server_list.

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/hidenorigoto/sacloud-mcp'

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