Skip to main content
Glama
alexleventer

Marketo MCP Server

by alexleventer

marketo_update_channel

Update properties of a Marketo channel including name, description, and type. Note that progression statuses cannot be changed after creation.

Instructions

Update an existing channel's properties (name, description, type). Cannot change progression statuses after creation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelIdYes
nameNo
descriptionNo
typeNo
applicationIdNo

Implementation Reference

  • src/index.ts:220-238 (registration)
    Registration of the 'marketo_update_channel' tool on the MCP server via server.tool() with name, description, and Zod schema.
    server.tool(
      'marketo_update_channel',
      'Update an existing channel\'s properties (name, description, type). Cannot change progression statuses after creation.',
      {
        channelId: z.number(),
        name: z.string().optional(),
        description: z.string().optional(),
        type: z.string().optional(),
        applicationId: z.number().optional(),
      },
      tool(async ({ channelId, name, description, type, applicationId }) =>
        makeApiRequest(`/asset/v1/channel/${channelId}.json`, 'POST', {
          name,
          description,
          type,
          applicationId,
        })
      )
    );
  • Handler function that receives channelId, name, description, type, applicationId and calls makeApiRequest to POST to /asset/v1/channel/{channelId}.json, updating the channel properties.
    tool(async ({ channelId, name, description, type, applicationId }) =>
      makeApiRequest(`/asset/v1/channel/${channelId}.json`, 'POST', {
        name,
        description,
        type,
        applicationId,
      })
    )
  • Zod schema defining the input parameters: channelId (required number), and optional name, description, type (strings), and applicationId (number).
    {
      channelId: z.number(),
      name: z.string().optional(),
      description: z.string().optional(),
      type: z.string().optional(),
      applicationId: z.number().optional(),
    },
  • The makeApiRequest helper function that handles authentication token retrieval and executes HTTP requests via axios.
    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;
      }
    }
  • The tool() wrapper helper that wraps handlers with try/catch and formats responses as MCP text content.
    function tool<T>(handler: (args: T) => Promise<unknown>) {
      return async (args: T) => {
        try {
          const response = await handler(args);
          return {
            content: [{ type: 'text' as const, text: JSON.stringify(response, null, 2) }],
          };
        } catch (error: any) {
          return {
            content: [
              {
                type: 'text' as const,
                text: `Error: ${error.response?.data?.message || error.message}`,
              },
            ],
            isError: true,
          };
        }
      };
    }
Behavior3/5

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

No annotations are provided, so the description must disclose behavioral traits. It mentions a limitation on progression statuses but omits details on side effects, authentication needs, or error conditions, which are important for an update operation.

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 extremely concise: one sentence stating the purpose and a critical constraint. No wasted words, front-loaded with the verb 'Update'.

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 the tool's simplicity (5 simple params, no output schema), the description addresses the core action and one key limitation. However, it lacks usage details for parameters and expected behavior on partial updates, making it only adequately complete.

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?

The description lists three updatable properties (name, description, type) but does not explain channelId, applicationId, or their roles. With 0% schema coverage, it adds only partial meaning beyond raw types.

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 tool updates an existing channel's properties (name, description, type) and distinguishes itself from sibling tools like create_channel and delete_channel by being a modification operation.

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 provides a clear constraint ('Cannot change progression statuses after creation') but does not explicitly mention when to use this tool versus alternatives like get_channel_by_id or create_channel, though the context implies use for modification.

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