Skip to main content
Glama
artem-amplemarket

Amplemarket Knowledge Base MCP Server

kb_get_collection

Retrieve collection metadata and articles from the knowledge base to access organized content using a collection ID.

Instructions

Get collection metadata and articles from the Pylon knowledge base

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCollection ID

Implementation Reference

  • The handler function that parses input arguments, fetches the collection using pylonClient.getCollection, and returns the JSON stringified result or an error message.
    export async function handleKbGetCollection(pylonClient: PylonAPI, args: unknown) {
      const params = GetCollectionParamsSchema.parse(args);
      
      try {
        const collection = await pylonClient.getCollection(params.id);
        
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(collection, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error getting collection: ${error instanceof Error ? error.message : 'Unknown error'}`
            }
          ],
          isError: true
        };
      }
    }
  • MCP tool definition including input schema for the kb_get_collection tool.
    export const kbGetCollectionTool: Tool = {
      name: 'kb_get_collection',
      description: 'Get collection metadata and articles from the Pylon knowledge base',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'Collection ID'
          }
        },
        required: ['id']
      }
    };
  • Zod schema used for parsing and validating the input arguments in the handler.
    export const GetCollectionParamsSchema = z.object({
      id: z.string().min(1, "Collection ID cannot be empty")
    });
  • src/index.ts:39-43 (registration)
    Registration of the tool in the ListToolsRequest handler, making it discoverable.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [kbGetArticleTool, kbGetCollectionTool, kbGetArticlesTool],
      };
    });
  • src/index.ts:45-56 (registration)
    Dispatch registration in the CallToolRequest handler via switch case for 'kb_get_collection'.
    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 'Get' which implies a read operation, but doesn't specify if it's safe, if it requires authentication, rate limits, or what happens on errors. For a tool with no annotations, this leaves significant behavioral gaps unaddressed.

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 purpose without any unnecessary words. It is front-loaded with the core action and resources, 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, no output schema, and a single parameter with full schema coverage, the description is incomplete. It lacks details on behavioral traits, return values, or usage context, which are crucial for an agent to invoke this tool effectively in a broader workflow.

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% description coverage, with the single parameter 'id' documented as 'Collection ID'. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. With high schema coverage, the baseline is 3, as the description doesn't compensate but doesn't detract either.

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 verb 'Get' and the resources 'collection metadata and articles', making the purpose evident. It specifies the source 'Pylon knowledge base' which provides context. However, it doesn't differentiate from sibling tools like 'amplemarket_get_all_articles' or 'amplemarket_get_article', which appear to be related but from a different domain, so sibling differentiation is incomplete.

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 any prerequisites, constraints, or scenarios where this tool is preferred over the sibling tools listed, leaving the agent with no usage context beyond the basic purpose.

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