Skip to main content
Glama

marketo_get_channel_by_id

Retrieve a Marketo channel's metadata, including progression statuses and their step numbers, by providing the channel ID.

Instructions

Get a single Marketo channel by ID. Returns channel metadata including progression statuses and their step numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesChannel ID

Implementation Reference

  • The tool 'marketo_get_channel_by_id' is defined as a server.tool() call. The handler (async callback) makes a GET request to /rest/asset/v1/channel/{id}.json to fetch a single Marketo channel by ID.
    // ── marketo_get_channel_by_id ──────────────────────────────────────────────
    server.tool(
      "marketo_get_channel_by_id",
      "Get a single Marketo channel by ID. Returns channel metadata including progression statuses and their step numbers.",
      {
        id: z.number().describe("Channel ID"),
      },
      async (args) => {
        try {
          return ok(await makeRequest(`/rest/asset/v1/channel/${args.id}.json`));
        } catch (e) { return err(e); }
      }
    );
  • Input schema for the tool: requires a single numeric 'id' parameter.
      id: z.number().describe("Channel ID"),
    },
  • src/index.ts:11-11 (registration)
    The registerChannelTools function is imported from './tools/channels.js' and called on line 27 to register all channel tools including marketo_get_channel_by_id.
    import { registerChannelTools } from "./tools/channels.js";
  • src/index.ts:27-27 (registration)
    registerChannelTools(server) registers the channel tools on the MCP server.
    registerChannelTools(server);
  • The makeRequest helper function that the handler calls to make authenticated HTTP requests to the Marketo API.
    export async function makeRequest<T = unknown>(
      endpoint: string,
      method: Method = "GET",
      data?: unknown,
      contentType?: string,
    ): Promise<T> {
      const token = await getAccessToken();
      const config: AxiosRequestConfig = {
        url: `${MARKETO_BASE_URL}${endpoint}`,
        method,
        headers: {
          Authorization: `Bearer ${token}`,
          ...(contentType ? { "Content-Type": contentType } : {}),
        },
        ...(data && method !== "GET" ? { data } : {}),
        ...(data && method === "GET" ? { params: data } : {}),
      };
    
      const res = await axios(config);
      const body = res.data;
    
      // Marketo REST API returns errors inside the response body
      if (body?.errors?.length) {
        const e = body.errors[0];
        throw new MarketoError(`${e.code}: ${e.message}`, res.status);
      }
    
      return body as T;
    }
Behavior3/5

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

No annotations are provided, so the description must carry the burden. It states the tool returns metadata including progression statuses, but does not disclose other behavioral traits such as read-only nature, authorization requirements, or side effects. It is adequate but not thorough.

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 two concise sentences with no redundant information. It front-loads the core purpose and adds a detail about the return value. Every sentence earns its place.

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 tool without an output schema, the description sufficiently explains what is returned. However, it could briefly mention that results include channel metadata beyond progression statuses, which would enhance completeness. Overall, it is adequate for the tool's low complexity.

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 input schema has 100% coverage with a single required parameter 'id' described as 'Channel ID'. The description adds no further semantic value beyond restating that the ID identifies the channel. With full schema coverage, a score of 3 is appropriate.

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 action ('Get a single Marketo channel') and the resource ('by ID'). It specifies what is returned ('channel metadata including progression statuses and their step numbers'), distinguishing it from sibling 'marketo_get_channels' which lists all channels.

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 use when needing a single channel by ID, but does not explicitly state when not to use or provide alternatives. Without explicit guidance, it meets the minimum but lacks clarity on distinguishing from 'marketo_get_channels' for listing or 'marketo_create_channel' for creation.

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

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