Skip to main content
Glama
artem-amplemarket

Amplemarket Knowledge Base MCP Server

amplemarket_get_article

Retrieve specific articles from the Amplemarket knowledge base using article ID or slug to access detailed content and information.

Instructions

Get a specific article from the Amplemarket knowledge base by ID or slug

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoArticle ID (provide either id or slug)
slugNoArticle slug (provide either id or slug)

Implementation Reference

  • The asynchronous handler function that implements the core logic of the 'amplemarket_get_article' tool. It parses the input arguments, fetches the article from the Pylon API using either ID or slug, and returns the article as formatted JSON or an error message.
    export async function handleKbGetArticle(pylonClient: PylonAPI, args: unknown) {
      const params = GetArticleParamsSchema.parse(args);
      
      try {
        let article;
        
        if (params.id) {
          article = await pylonClient.getArticleById(params.id);
        } else if (params.slug) {
          article = await pylonClient.getArticleBySlug(params.slug);
        } else {
          throw new Error('Either id or slug must be provided');
        }
        
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(article, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error getting article: ${error instanceof Error ? error.message : 'Unknown error'}`
            }
          ],
          isError: true
        };
      }
    }
  • The tool definition object 'kbGetArticleTool' that specifies the name, description, and input schema for the MCP tool.
    export const kbGetArticleTool: Tool = {
      name: 'amplemarket_get_article',
      description: 'Get a specific article from the Amplemarket knowledge base by ID or slug',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'Article ID (provide either id or slug)'
          },
          slug: {
            type: 'string',
            description: 'Article slug (provide either id or slug)'
          }
        },
        additionalProperties: false
      }
    };
  • Zod schema 'GetArticleParamsSchema' used in the handler for input validation, ensuring either 'id' or 'slug' is provided.
    export const GetArticleParamsSchema = z.object({
      id: z.string().optional(),
      slug: z.string().optional()
    }).refine(
      (data) => data.id || data.slug,
      {
        message: "Either 'id' or 'slug' must be provided",
        path: ["id"]
      }
    );
  • src/index.ts:39-43 (registration)
    Registration of the tool in the MCP server's ListTools request handler by including 'kbGetArticleTool' in the returned tools list.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [kbGetArticleTool, kbGetCollectionTool, kbGetArticlesTool],
      };
    });
  • src/index.ts:45-56 (registration)
    Dispatch registration in the MCP server's CallTool request handler, mapping 'amplemarket_get_article' to the 'handleKbGetArticle' function.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      switch (request.params.name) {
        case 'amplemarket_get_article':
          return await handleKbGetArticle(pylonClient, request.params.arguments);
        case 'kb_get_collection':
          return await handleKbGetCollection(pylonClient, request.params.arguments);
        case 'amplemarket_get_all_articles':
          return await handleKbGetArticles(pylonClient, request.params.arguments);
        default:
          throw new Error(`Unknown tool: ${request.params.name}`);
      }
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves an article but lacks details on error handling (e.g., what happens if ID/slug is invalid), rate limits, authentication requirements, or response format. This leaves significant gaps for an agent to understand operational behavior.

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, efficient sentence that directly states the tool's function without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete for a retrieval tool. It doesn't explain what data is returned (e.g., article content, metadata), error conditions, or dependencies. For a tool with 2 parameters and no structured behavioral hints, more context is needed to guide effective use.

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 description coverage is 100%, with clear descriptions for both parameters ('id' and 'slug') and their mutual exclusivity. The description adds minimal value beyond the schema by mentioning 'by ID or slug', but it doesn't provide additional context like format examples or usage tips. Baseline 3 is appropriate as the schema handles most documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('a specific article from the Amplemarket knowledge base'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'amplemarket_get_all_articles' (which retrieves multiple articles) or 'kb_get_collection' (which may retrieve collections rather than individual articles).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios where this tool is preferred over 'amplemarket_get_all_articles' for single articles or 'kb_get_collection' for different resource types, nor does it discuss prerequisites like authentication or availability.

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/artem-amplemarket/amplemarket-pylon-mcp'

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