Skip to main content
Glama
alexleventer

Marketo MCP Server

by alexleventer

marketo_create_channel

Creates a new Marketo program channel with a unique name and type. The type determines which program types can use this channel.

Instructions

Create a new program channel. Channels must have a unique name and type. The type determines which program types can use this channel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
descriptionNo
typeYes
applicationIdNo

Implementation Reference

  • The function that executes the Marketo create channel API call. It's an inline async handler that takes (name, description, type, applicationId) and sends a POST request to /asset/v1/channels.json with those fields.
    tool(async ({ name, description, type, applicationId }) =>
      makeApiRequest('/asset/v1/channels.json', 'POST', {
        name,
        description,
        type,
        applicationId,
      })
    )
  • Zod schema defining the input parameters for the create channel tool: name (string, required), description (string, optional), type (string, required), applicationId (number, optional).
    {
      name: z.string(),
      description: z.string().optional(),
      type: z.string(),
      applicationId: z.number().optional(),
    },
  • src/index.ts:201-218 (registration)
    Registration of the 'marketo_create_channel' tool with the MCP server via server.tool(), including its description, input schema, and handler.
    server.tool(
      'marketo_create_channel',
      'Create a new program channel. Channels must have a unique name and type. The type determines which program types can use this channel.',
      {
        name: z.string(),
        description: z.string().optional(),
        type: z.string(),
        applicationId: z.number().optional(),
      },
      tool(async ({ name, description, type, applicationId }) =>
        makeApiRequest('/asset/v1/channels.json', 'POST', {
          name,
          description,
          type,
          applicationId,
        })
      )
    );
  • The makeApiRequest helper function used by the handler to perform the actual HTTP request to the Marketo REST API.
    async function makeApiRequest(
      endpoint: string,
      method: string,
      data?: any,
      contentType: string = 'application/json'
    ) {
      const token = await tokenManager.getToken();
      const headers: Record<string, string> = {
        Authorization: `Bearer ${token}`,
      };
    
      if (contentType) {
        headers['Content-Type'] = contentType;
      }
    
      try {
        const response = await axios({
          url: `${MARKETO_BASE_URL}${endpoint}`,
          method,
          data:
            contentType === 'application/x-www-form-urlencoded'
              ? new URLSearchParams(data).toString()
              : data,
          headers,
        });
        return response.data;
      } catch (error: any) {
        console.error('API request failed:', error.response?.data || error.message);
        throw error;
      }
    }
Behavior3/5

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

With no annotations, the description carries full burden. It discloses that channels must have unique name and type, and that type determines program type compatibility. However, it lacks details on error handling, idempotency, or side effects of creation.

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?

Two sentences front-loaded with purpose, no unnecessary words. Efficient and to the point.

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

Completeness3/5

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

Given no output schema and 4 parameters with 0% coverage, the description covers critical constraints but omits response format and optional parameter purpose. It is minimally complete for a simple create tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must explain parameters. It adds meaning for 'name' and 'type' (unique constraints, type's role) but does not address 'description' or 'applicationId', leaving half the parameters undefined.

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 'Create a new program channel' with a specific verb and resource. It also adds constraints (unique name and type, type determines program types) that distinguish it from sibling tools that read, update, or delete channels.

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

Usage Guidelines4/5

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

The description implicitly indicates use when creating a new channel. Sibling tool names clearly differentiate read (get_channels, get_channel_by_id), update, and delete operations, providing context without explicit when-not statements.

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/alexleventer/marketo-mcp'

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