Skip to main content
Glama

marketo_get_channels

List all Marketo channels with names, progression statuses, and applicability. Channels define program type taxonomy like Webinar or Tradeshow. Supports pagination via maxReturn and offset parameters.

Instructions

List all channels in Marketo. Channels define the program type taxonomy (e.g. Webinar, Tradeshow, Email Send). Returns channel names, progression statuses, and applicability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxReturnNoMax channels to return (1-200, default 20)
offsetNoPagination offset

Implementation Reference

  • The async handler function for 'marketo_get_channels'. It calls makeRequest to GET /rest/asset/v1/channels.json with optional maxReturn and offset params, then returns the result via the ok helper.
      async (args) => {
        try {
          const params: Record<string, unknown> = {};
          if (args.maxReturn) params.maxReturn = args.maxReturn;
          if (args.offset) params.offset = args.offset;
          return ok(await makeRequest("/rest/asset/v1/channels.json", "GET", params));
        } catch (e) { return err(e); }
      }
    );
  • Input schema for 'marketo_get_channels'. Defines two optional Zod parameters: maxReturn (number, limits results 1-200, default 20) and offset (number, pagination offset).
    {
      maxReturn: z.number().optional().describe("Max channels to return (1-200, default 20)"),
      offset: z.number().optional().describe("Pagination offset"),
    },
  • Registration of the 'marketo_get_channels' tool on the McpServer via server.tool(). The tool description explains it lists all channels defining Marketo's program type taxonomy.
    server.tool(
      "marketo_get_channels",
      "List all channels in Marketo. Channels define the program type taxonomy (e.g. Webinar, Tradeshow, Email Send). Returns channel names, progression statuses, and applicability.",
      {
        maxReturn: z.number().optional().describe("Max channels to return (1-200, default 20)"),
        offset: z.number().optional().describe("Pagination offset"),
      },
      async (args) => {
        try {
          const params: Record<string, unknown> = {};
          if (args.maxReturn) params.maxReturn = args.maxReturn;
          if (args.offset) params.offset = args.offset;
          return ok(await makeRequest("/rest/asset/v1/channels.json", "GET", params));
        } catch (e) { return err(e); }
      }
    );
  • src/index.ts:12-29 (registration)
    Import and registration call: registerChannelTools(server) is imported from './tools/channels.js' and invoked, which registers the marketo_get_channels tool (along with others) on the MCP server.
    import { registerLandingPageTools } from "./tools/landingPages.js";
    import { registerBulkExportTools } from "./tools/bulkExport.js";
    
    const server = new McpServer({
      name: "marketo-mcp",
      version: "0.1.0",
    });
    
    // Register all tool groups
    registerFormTools(server);
    registerLeadTools(server);
    registerProgramTools(server);
    registerEmailTools(server);
    registerSmartListTools(server);
    registerListTools(server);
    registerChannelTools(server);
    registerLandingPageTools(server);
    registerBulkExportTools(server);
  • The makeRequest helper that the handler delegates to. It authenticates (via getAccessToken), makes an HTTP request to the Marketo API endpoint, and returns the response body.
    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 provided, and the description does not state read-only or destructive behavior. It mentions return fields but lacks rate limits or error info.

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 wasted words.

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?

Lacks mention of pagination, default limit, or read-only nature. For a list tool with no output schema, more context is needed.

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 100% with descriptions, so the description adds no additional value beyond the schema. Baseline 3 applies.

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 'List all channels' and explains the concept of channels, distinguishing from siblings like marketo_get_channel_by_id and marketo_create_channel.

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?

Implied usage for listing channels, but no explicit guidance on when to use vs alternatives like marketo_get_channel_by_id or pagination details.

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