create_discussion
Initiate structured discussions by defining titles, content, urgency levels, and tags using the Model Context Protocol (MCP). Facilitate AI-driven collaboration and project context management.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Detailed question or discussion content | |
| tags | No | Tags to categorize the discussion | |
| title | Yes | Title of the discussion/question | |
| urgency | No | Urgency level of the question |
Implementation Reference
- src/cli.ts:216-252 (registration)Registration of the MCP tool 'create_discussion' including Zod input schema and async handler function.this.server.tool( 'create_discussion', { title: z.string().describe('Title of the discussion/question'), content: z.string().describe('Detailed question or discussion content'), urgency: z .enum(['low', 'medium', 'high']) .optional() .describe('Urgency level of the question'), tags: z .array(z.string()) .optional() .describe('Tags to categorize the discussion'), }, async ({ title, content, urgency }) => { if (!this.client) { throw new Error('Not connected to Buildable API'); } const result = await this.client.createDiscussion({ topic: title, message: content, context: { urgency, }, }); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } );
- src/client.ts:231-262 (handler)Helper method in BuildableMCPClient that implements the actual API call to create a discussion via POST to /projects/{projectId}/discussasync createDiscussion( discussion: CreateDiscussionRequest ): Promise<DiscussionResponse> { this.log('debug', `Creating discussion: "${discussion.topic}"`); try { const response = await this.makeRequest<DiscussionResponse>( 'POST', `/projects/${this.config.projectId}/discuss`, { type: 'question', title: discussion.topic, message: discussion.message, context: { task_id: discussion.context?.current_task_id, relevant_files: discussion.context?.related_files, specific_challenge: discussion.context?.specific_challenge, urgency: discussion.context?.urgency || 'medium', }, urgency: discussion.context?.urgency || 'medium', requires_human_response: true, created_by: this.aiAssistantId, } ); this.log('info', `Discussion created: ${response.data?.discussion_id}`); return response.data!; } catch (error) { this.log('error', 'Failed to create discussion:', error); throw error; } }
- src/types.ts:144-153 (schema)TypeScript interface defining the CreateDiscussionRequest used by the client.createDiscussion method.export interface CreateDiscussionRequest { topic: string; message: string; context?: { current_task_id?: string; related_files?: string[]; specific_challenge?: string; urgency?: 'low' | 'medium' | 'high'; }; }