Skip to main content
Glama

create_program_edition

Create a program edition by specifying its name, associated program, dates, cost scheme, participant limits, and publication status.

Instructions

Create a program edition

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
program_idYesUnique identifier of associated program.
nameYesName of the program edition.
start_dateNoNominal start date of the edition.
end_dateNoNominal end date of the edition (inclusive).
costNoThe price to be paid for this edition. Required if cost_scheme is student (default value) or order.
cost_schemeNoHow should the edition be paid by default.
min_participantsNoA number representing the minimum number of participants.
max_participantsNoA number representing the maximum number of participants.
is_publishedNoBoolean representing the publishable status of the edition.
customNo
custom_associationsNo

Implementation Reference

  • The handler function for the create_program_edition tool. It receives the validated body (program_id, name, etc.), makes a POST request to /program/editions, logs the response, and returns a formatted success result.
    async (body) => {
      try {
        const record = await apiPost<EduframeRecord>("/program/editions", body);
        void logResponse("create_program_edition", body, record);
        return formatCreate(record, "program edition");
      } catch (error) {
        return formatError(error);
      }
    },
  • Input schema for create_program_edition. Defines the Zod validation for fields: program_id (required), name (required), start_date, end_date, cost, cost_scheme (enum: student/order/tbd/free), min_participants, max_participants, is_published, custom, and custom_associations.
    description: "Create a program edition",
    annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
    inputSchema: {
      program_id: z.number().int().describe("Unique identifier of associated program."),
      name: z.string().describe("Name of the program edition."),
      start_date: z.string().optional().describe("Nominal start date of the edition."),
      end_date: z.string().optional().describe("Nominal end date of the edition (inclusive)."),
      cost: z
        .number()
        .optional()
        .describe(
          "The price to be paid for this edition. Required if cost_scheme is student (default value) or order.",
        ),
      cost_scheme: programEditionCostSchemeEnum.optional().describe("How should the edition be paid by default."),
      min_participants: z
        .number()
        .int()
        .optional()
        .describe("A number representing the minimum number of participants."),
      max_participants: z
        .number()
        .int()
        .optional()
        .describe("A number representing the maximum number of participants."),
      is_published: z.boolean().optional().describe("Boolean representing the publishable status of the edition."),
      custom: z.record(z.unknown()).optional(),
      custom_associations: z.record(z.unknown()).optional(),
    },
  • Registration of the create_program_edition tool via server.registerTool() with the name 'create_program_edition', the input schema, and the handler function.
    server.registerTool(
      "create_program_edition",
      {
        description: "Create a program edition",
        annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
        inputSchema: {
          program_id: z.number().int().describe("Unique identifier of associated program."),
          name: z.string().describe("Name of the program edition."),
          start_date: z.string().optional().describe("Nominal start date of the edition."),
          end_date: z.string().optional().describe("Nominal end date of the edition (inclusive)."),
          cost: z
            .number()
            .optional()
            .describe(
              "The price to be paid for this edition. Required if cost_scheme is student (default value) or order.",
            ),
          cost_scheme: programEditionCostSchemeEnum.optional().describe("How should the edition be paid by default."),
          min_participants: z
            .number()
            .int()
            .optional()
            .describe("A number representing the minimum number of participants."),
          max_participants: z
            .number()
            .int()
            .optional()
            .describe("A number representing the maximum number of participants."),
          is_published: z.boolean().optional().describe("Boolean representing the publishable status of the edition."),
          custom: z.record(z.unknown()).optional(),
          custom_associations: z.record(z.unknown()).optional(),
        },
      },
      async (body) => {
        try {
          const record = await apiPost<EduframeRecord>("/program/editions", body);
          void logResponse("create_program_edition", body, record);
          return formatCreate(record, "program edition");
        } catch (error) {
          return formatError(error);
        }
      },
    );
  • The registerAllTools function iterates over all tool registration functions, including registerProgramEditionTools which registers create_program_edition.
    export function registerAllTools(server: McpServer): void {
      for (const register of tools) {
        register(server);
      }
    }
  • The apiPost helper function used by the handler to call the Eduframe API via POST to /program/editions.
    /**
     * Perform a POST request to create a resource.
     *
     * @param path - API path, e.g. "/leads"
     * @param body - Request body
     */
    export async function apiPost<T>(path: string, body: unknown): Promise<T> {
      const { token } = getConfig();
      const url = buildUrl(path);
    
      const response = await fetch(url.toString(), {
        method: "POST",
        headers: buildHeaders(token),
        body: JSON.stringify(body),
      });
    
      return handleResponse<T>(response);
    }
    
    /**
     * Perform a PUT request to update a resource.
     *
     * @param path - API path, e.g. "/leads/1"
     * @param body - Request body
     */
    export async function apiPut<T>(path: string, body: unknown): Promise<T> {
      const { token } = getConfig();
      const url = buildUrl(path);
    
      const response = await fetch(url.toString(), {
        method: "PUT",
        headers: buildHeaders(token),
        body: JSON.stringify(body),
      });
    
      return handleResponse<T>(response);
    }
    
    /**
     * Perform a PATCH request to partially update a resource.
     *
     * @param path - API path, e.g. "/leads/1"
     * @param body - Request body
     */
    export async function apiPatch<T>(path: string, body: unknown): Promise<T> {
      const { token } = getConfig();
      const url = buildUrl(path);
    
      const response = await fetch(url.toString(), {
        method: "PATCH",
        headers: buildHeaders(token),
        body: JSON.stringify(body),
      });
    
      return handleResponse<T>(response);
    }
    
    /**
     * Perform a DELETE request to remove a resource.
     *
     * @param path - API path, e.g. "/leads/1"
     */
    export async function apiDelete<T>(path: string): Promise<T> {
      const { token } = getConfig();
      const url = buildUrl(path);
    
      const response = await fetch(url.toString(), {
        method: "DELETE",
        headers: buildHeaders(token),
      });
    
      return handleResponse<T>(response);
    }
Behavior2/5

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

Annotations indicate it is not read-only, not destructive, and not idempotent. The description simply restates creation, but does not disclose side effects, validation behavior, or constraints beyond the schema. For a non-idempotent write operation, more behavioral context is needed.

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?

Single sentence with no wasted words. It is as concise as possible while still conveying the purpose.

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

Completeness2/5

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

Given the complexity (11 parameters, no output schema), the description is too minimal. It does not explain what the tool returns, the relationship to program editions, or any constraints. It relies entirely on the input 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 coverage is high (82%), and the schema already describes each parameter. The description adds no additional meaning beyond 'create', so it provides no extra value. Baseline score of 3 is appropriate.

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 'Create a program edition' clearly states the action and resource. It distinguishes from siblings like 'create_program' and 'update_program_edition', though it does not elaborate on what a program edition is in relation to a program.

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?

No guidance on when to use this tool versus alternatives. There is no mention of prerequisites (e.g., program must exist) or when not to use it. With numerous sibling create tools, explicit guidance is needed.

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/martijnpieters/eduframe-mcp'

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