Skip to main content
Glama
alexleventer

Marketo MCP Server

by alexleventer

marketo_get_channel_by_id

Fetch a specific Marketo channel by numeric ID to obtain its progression statuses and success mappings.

Instructions

Retrieve a single channel by its numeric ID. Returns the channel definition including progression statuses and their success mappings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelIdYes

Implementation Reference

  • The handler function for marketo_get_channel_by_id. It extracts the channelId parameter and makes a GET request to /asset/v1/channel/{channelId}.json to retrieve a single channel.
    tool(async ({ channelId }) => makeApiRequest(`/asset/v1/channel/${channelId}.json`, 'GET'))
  • The input schema for the tool: requires a single numeric 'channelId' parameter, validated with Zod.
    { channelId: z.number() },
  • src/index.ts:194-199 (registration)
    Registration of the 'marketo_get_channel_by_id' tool on the MCP server with its description, schema, and handler.
    server.tool(
      'marketo_get_channel_by_id',
      'Retrieve a single channel by its numeric ID. Returns the channel definition including progression statuses and their success mappings.',
      { channelId: z.number() },
      tool(async ({ channelId }) => makeApiRequest(`/asset/v1/channel/${channelId}.json`, 'GET'))
    );
  • The makeApiRequest helper function that handles authentication token injection, HTTP request execution, and error handling for all API calls, used by the tool handler.
    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?

Without annotations, the description indicates a read operation ('Retrieve', 'Returns') and describes the return shape. However, it does not mention error conditions, authentication needs, or what happens if the channel ID is invalid, which could be important for an agent.

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 a single, well-structured sentence that conveys the essential information without extraneous words. Every part is meaningful.

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 simple single-parameter retrieval tool, the description covers purpose and return shape. It would benefit from mentioning error behavior or permissions, but overall it is adequate given the tool's simplicity and lack of output schema.

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?

The schema has 0% description coverage for the only parameter 'channelId'. The description merely calls it a 'numeric ID', which is redundant with the schema type (number). No additional semantic or constraints are provided.

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 retrieves a single channel by numeric ID, and specifies it returns progression statuses and success mappings. This distinguishes it from sibling like marketo_get_channels which returns a list.

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

Usage Guidelines3/5

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

The description implies usage when you have a channel ID, but does not explicitly state when to use this over alternatives or list prerequisites. Usage is clear from name and description but lacks explicit guidance.

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