pylon_create_knowledge_base_article
Add new documentation, FAQs, or troubleshooting guides to a knowledge base for customer self-service support.
Instructions
Create a new help article in a knowledge base. Use this to add new documentation, FAQs, or troubleshooting guides that customers can access for self-service support.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| knowledge_base_id | Yes | ID of the knowledge base to add article to. Example: "kb_123abc" | |
| title | Yes | Article title that clearly describes the topic. Examples: "How to Reset Your Password", "Troubleshooting Login Issues", "Billing FAQ" | |
| content | Yes | Full article content in markdown or HTML format. Include step-by-step instructions, screenshots, and links. Example: "## Steps to Reset Password 1. Go to login page 2. Click Forgot Password..." |
Implementation Reference
- src/index.ts:459-475 (handler)Handler for the 'pylon_create_knowledge_base_article' tool. Validates required parameters (knowledge_base_id, title, content), calls the PylonClient.createKnowledgeBaseArticle method, and returns the created article as JSON.
case 'pylon_create_knowledge_base_article': { if (!args || !('knowledge_base_id' in args) || !('title' in args) || !('content' in args)) { throw new Error('knowledge_base_id, title, and content are required'); } const article = await pylonClient.createKnowledgeBaseArticle( args.knowledge_base_id as string, { title: args.title as string, content: args.content as string } ); return { content: [ { type: 'text', text: JSON.stringify(article, null, 2), }, ], }; } - src/index.ts:115-126 (schema)Tool registration schema defining the 'pylon_create_knowledge_base_article' tool with its name, description, and input validation schema. Specifies three required parameters: knowledge_base_id, title, and content.
name: 'pylon_create_knowledge_base_article', description: 'Create a new help article in a knowledge base. Use this to add new documentation, FAQs, or troubleshooting guides that customers can access for self-service support.', inputSchema: { type: 'object', properties: { knowledge_base_id: { type: 'string', description: 'ID of the knowledge base to add article to. Example: "kb_123abc"' }, title: { type: 'string', description: 'Article title that clearly describes the topic. Examples: "How to Reset Your Password", "Troubleshooting Login Issues", "Billing FAQ"' }, content: { type: 'string', description: 'Full article content in markdown or HTML format. Include step-by-step instructions, screenshots, and links. Example: "## Steps to Reset Password\n1. Go to login page\n2. Click Forgot Password..."' }, }, required: ['knowledge_base_id', 'title', 'content'], }, }, - src/pylon-client.ts:134-137 (helper)PylonClient method that makes the actual HTTP POST request to create a knowledge base article. Takes a knowledge base ID and article object (title, content), sends to the Pylon API endpoint, and returns the created article.
async createKnowledgeBaseArticle(knowledgeBaseId: string, article: Omit<PylonArticle, 'id' | 'knowledge_base_id'>): Promise<PylonArticle> { const response: AxiosResponse<PylonArticle> = await this.client.post(`/knowledge-bases/${knowledgeBaseId}/articles`, article); return response.data; }