Skip to main content
Glama

create-service

Add a new service to an existing Koyeb app by configuring deployment settings, scaling, and resources.

Instructions

Create a new service inside an existing app

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
bodyYes

Implementation Reference

  • Handler factory function that creates the actual tool callback. For 'create-service', it calls koyeb.createService with auth and params, returning the API result as text content.
    export function createApiTool(name: keyof Koyeb): ToolCallback<ZodRawShape> {
      const fn = koyeb[name] as Function;
    
      return async (params: object) => {
        const result = await fn({ auth, ...params });
    
        if (result.error) {
          return createTextContent('Error: ' + result.error ? JSON.stringify(result.error) : 'unknown error');
        }
    
        return createTextContent(JSON.stringify(result.data));
      };
    }
  • Registration of the 'create-service' tool with MCP server. Defines the tool name, description, input schema (query params and body with app_id and definition), and the handler.
    server.tool(
      'create-service',
      'Create a new service inside an existing app',
      {
        query: z
          .object({
            dry_run: z.string().optional().describe('If set only run validation'),
          })
          .optional(),
        body: z.object({
          app_id: z.string().describe('The id of the app'),
          definition: deploymentDefinitionSchema,
        }),
      },
      createApiTool('createService'),
    );
  • Zod schema for the deployment definition used in the create-service request body. Validates archive, docker, git config, environment variables, health checks, instance types, ports, regions, scaling, volumes, etc.
    export const deploymentDefinitionSchema = z.object({
      archive: archive.optional(),
      config_files: configFile.array().optional(),
      docker: docker.optional(),
      env: env.array().optional(),
      git: git.optional(),
      health_checks: healthCheck.array().optional(),
      instance_types: instanceType.array(),
      name: z.string(),
      ports: port.array().optional(),
      regions: z.array(regions).min(1),
      routes: route.array().optional(),
      scalings: scaling.array(),
      skip_cache: z.boolean().optional(),
      strategy: strategy.optional(),
      type: z.union([z.literal("INVALID"), z.literal("WEB"), z.literal("WORKER"), z.literal("DATABASE")]),
      volumes: volume.array().optional(),
    });
Behavior1/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 but provides none. It doesn't mention that this is a write operation (creating resources), doesn't discuss permissions required, doesn't indicate potential costs or resource implications, and doesn't describe what happens after creation (e.g., deployment process, status changes). This is inadequate for a complex creation tool.

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 states the core purpose without unnecessary words. It's appropriately sized for a tool name that already indicates the action ('create-service'), though the brevity comes at the cost of missing important contextual information.

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 complex creation tool with no annotations, no output schema, and a highly nested parameter structure (definition object with 15+ properties), the description is completely inadequate. It doesn't explain what a 'service' is in this system, doesn't mention the extensive configuration options available, and provides no information about the creation process or result.

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?

With 0% schema description coverage and 2 parameters (one required), the description provides no information about parameters. It doesn't mention the 'app_id' requirement, the complex 'definition' object with numerous nested properties, or the optional 'dry_run' query parameter. The description fails to compensate for the complete lack of schema documentation.

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 action ('Create') and resource ('a new service inside an existing app'), making the purpose immediately understandable. It distinguishes from sibling tools like 'create-app' by specifying creation within an existing app rather than creating the app itself. However, it doesn't specify what a 'service' entails in this context.

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. It doesn't mention prerequisites (like needing an existing app), doesn't differentiate from similar tools like 'update-service' or 'deploy', and offers no context about appropriate use cases or limitations.

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/samihalawa/mcp-server-koyeb'

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