Skip to main content
Glama

ESA MCP Server

by aliyun
deploy.ts1.73 kB
import { CallToolRequest, Tool } from '@modelcontextprotocol/sdk/types.js'; import api from '../../utils/service.js'; import { PublishRoutineCodeVersionRequest } from '@alicloud/esa20240910'; export const ROUTINE_CODE_DEPLOY_TOOL: Tool = { name: 'routine_code_deploy', description: 'Deploy a selected code version to the staging or production environment. If version is not exist, should call routine_code_commit first', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'The name of the routine, support lowercase English, numbers, and hyphens, must start with lowercase English, length cannot be less than 2 characters', }, codeVersion: { type: 'string', description: 'Version of the routine, must be a valid semantic version', }, env: { type: 'string', description: 'Environment of the routine, must be "production" or "staging". If the user has no special requirements, it will be deployed to the production environment by default', }, }, required: ['name', 'codeVersion', 'env'], }, }; export const routine_code_deploy = async (request: CallToolRequest) => { const res = await api.publishRoutineCodeVersion( request.params.arguments as PublishRoutineCodeVersionRequest, ); if (!res) { return { content: [ { type: 'text', text: `Failed to publish routine code version. ${JSON.stringify(res)}`, }, ], success: false, }; } else { return { content: [ { type: 'text', text: JSON.stringify(res), }, ], success: true, }; } };

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/aliyun/mcp-server-esa'

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