Skip to main content
Glama

service_create_from_repo

Deploy applications by creating services from GitHub repositories, enabling automated builds and deployments for source code projects.

Instructions

[API] Create a new service from a GitHub repository

⚡️ Best for: ✓ Deploying applications from source code ✓ Services that need build processes ✓ GitHub-hosted projects

⚠️ Not for: × Pre-built Docker images (use service_create_from_image) × Database deployments (use database_deploy) × Static file hosting

→ Prerequisites: project_list

→ Alternatives: service_create_from_image, database_deploy

→ Next steps: variable_set, service_update

→ Related: deployment_trigger, service_info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesID of the project to create the service in
repoYesGitHub repository URL or name (e.g., 'owner/repo')
nameNoOptional custom name for the service

Implementation Reference

  • The MCP tool handler function that executes the tool logic by calling serviceService.createServiceFromRepo.
    async ({ projectId, repo, name }) => {
      return serviceService.createServiceFromRepo(projectId, repo, name);
    }
  • Input schema using Zod defining the required parameters for the tool.
    {
      projectId: z.string().describe("ID of the project to create the service in"),
      repo: z.string().describe("GitHub repository URL or name (e.g., 'owner/repo')"),
      name: z.string().optional().describe("Optional custom name for the service")
    },
  • Tool definition and local registration using createTool function, including name, description, schema, and handler.
    createTool(
      "service_create_from_repo",
      formatToolDescription({
        type: 'API',
        description: "Create a new service from a GitHub repository",
        bestFor: [
          "Deploying applications from source code",
          "Services that need build processes",
          "GitHub-hosted projects"
        ],
        notFor: [
          "Pre-built Docker images (use service_create_from_image)",
          "Database deployments (use database_deploy)",
          "Static file hosting"
        ],
        relations: {
          prerequisites: ["project_list"],
          nextSteps: ["variable_set", "service_update"],
          alternatives: ["service_create_from_image", "database_deploy"],
          related: ["deployment_trigger", "service_info"]
        }
      }),
      {
        projectId: z.string().describe("ID of the project to create the service in"),
        repo: z.string().describe("GitHub repository URL or name (e.g., 'owner/repo')"),
        name: z.string().optional().describe("Optional custom name for the service")
      },
      async ({ projectId, repo, name }) => {
        return serviceService.createServiceFromRepo(projectId, repo, name);
      }
    ),
  • Supporting method in serviceService that performs the actual API call to create service from repo using the client.
    async createServiceFromRepo(projectId: string, repo: string, name?: string) {
      try {
        const service = await this.client.services.createService({
          projectId,
          name,
          source: {
            repo,
          }
        });
    
        return createSuccessResponse({
          text: `Created new service "${service.name}" (ID: ${service.id}) from GitHub repo "${repo}"`,
          data: service
        });
      } catch (error) {
        return createErrorResponse(`Error creating service: ${formatError(error)}`);
      }
    }
  • Global registration where serviceTools (including service_create_from_repo) is spread into allTools and each tool registered with the MCP server via server.tool.
    export function registerAllTools(server: McpServer) {
      // Collect all tools
      const allTools = [
        ...databaseTools,
        ...deploymentTools,
        ...domainTools,
        ...projectTools,
        ...serviceTools,
        ...tcpProxyTools,
        ...variableTools,
        ...configTools,
        ...volumeTools,
        ...templateTools,
      ] as Tool[];
    
      // Register each tool with the server
      allTools.forEach((tool) => {
        server.tool(
          ...tool
        );
      });
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates that this is a creation/mutation tool (implied by 'Create'), specifies it's for GitHub repositories, and mentions build processes. However, it doesn't detail authentication needs, rate limits, or what happens on failure, leaving some behavioral aspects unclear.

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 well-structured with clear sections (API note, Best for, Not for, Prerequisites, Alternatives, Next steps, Related), using bullet points and symbols for readability. Every sentence earns its place by providing actionable guidance without redundancy.

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

Completeness4/5

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

For a creation tool with no annotations and no output schema, the description does an excellent job covering usage context, alternatives, and prerequisites. However, it lacks details on return values or error handling, which would be helpful given the mutation nature and absence of output schema.

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 already documents all three parameters. The description doesn't add any additional parameter semantics beyond what's in the schema (e.g., format examples for 'repo' are in the schema). Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose5/5

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

The description clearly states the specific action ('Create a new service') and resource ('from a GitHub repository'), distinguishing it from sibling tools like service_create_from_image. It explicitly mentions deploying applications from source code and GitHub-hosted projects, providing a precise purpose.

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

Usage Guidelines5/5

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

The description includes explicit 'Best for' and 'Not for' sections with named alternatives (service_create_from_image, database_deploy), prerequisites (project_list), and related next steps (variable_set, service_update). This provides comprehensive guidance on when to use this tool versus others.

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/epitaphe360/railway-mcp'

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