Skip to main content
Glama

deploy_heim_application

Deploy backend applications to a local Heim runtime using the 'heim deploy' command, making them available at http://127.0.0.1:3000 with paths defined in OpenAPI specifications.

Instructions

Runs 'heim deploy' command to deploy an application to a local Heim runtime. Which will make the application availible on http://127.0.0.1:3000 where is the path defined in your OpenAPI specification

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoAbsolute windows path to the application folder root

Implementation Reference

  • The handler function executes the 'heim deploy' command using child_process.exec.promisify on the provided application path, returning stdout/stderr or an error.
    async (request) => {
      const execPromise = util.promisify(exec);
      try {
        const { stdout, stderr } = await execPromise(
          `heim deploy ${request.path}`
        );
        return {
          content: [
            {
              type: "text",
              text: `stdout:\n${stdout}\nstderr:\n${stderr}`,
            },
          ],
        };
      } catch (err: any) {
        return {
          content: [{ type: "text", text: `Error: ${err.message}` }],
          isError: true,
        };
      }
    }
  • Input schema defining an optional 'path' string parameter for the absolute path to the application folder.
    inputSchema: {
      path: z
        .string()
        .describe("Absolute windows path to the application folder root")
        .optional(),
    },
  • src/tools.ts:98-137 (registration)
    Registers the 'deploy_heim_application' tool with the MCP server, including title, description, input schema, annotations, and handler function.
    server.registerTool(
      "deploy_heim_application",
      {
        title: "Deploy Heim Application",
        description:
          "Runs 'heim deploy' command to deploy an application to a local Heim runtime. Which will make the application availible on http://127.0.0.1:3000<PATH> where <PATH> is the path defined in your OpenAPI specification",
        inputSchema: {
          path: z
            .string()
            .describe("Absolute windows path to the application folder root")
            .optional(),
        },
        annotations: {
          destructiveHint: false,
          readOnlyHint: false,
          idempotentHint: true,
          openWorldHint: false,
        },
      },
      async (request) => {
        const execPromise = util.promisify(exec);
        try {
          const { stdout, stderr } = await execPromise(
            `heim deploy ${request.path}`
          );
          return {
            content: [
              {
                type: "text",
                text: `stdout:\n${stdout}\nstderr:\n${stderr}`,
              },
            ],
          };
        } catch (err: any) {
          return {
            content: [{ type: "text", text: `Error: ${err.message}` }],
            isError: true,
          };
        }
      }

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/Nor2-io/heim-mcp'

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