secondbrainos-mcp-server 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/index.js +11 -15
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -318,25 +318,21 @@ class SecondBrainOSServer {
318
318
  }
319
319
  // Otherwise treat as a workflow prompt
320
320
  const workflowId = this.workflowNameToId.get(promptName) || promptName;
321
- // Fetch workflow metadata from the workflows list
321
+ // Single call list response now includes prompt metadata per workflow
322
322
  const workflowsData = await this.callRunPromptChain('', '');
323
323
  const workflowMeta = (workflowsData.workflows || []).find((wf) => wf.workflow_id === workflowId);
324
- const workflowDetail = await this.callRunPromptChain('workflow', workflowId);
325
- const promptIds = workflowDetail.prompt_id || [];
326
- if (promptIds.length === 0) {
324
+ const prompts = workflowMeta?.prompts || [];
325
+ if (prompts.length === 0) {
327
326
  throw new McpError(ErrorCode.InvalidRequest, `No prompts found for workflow: ${workflowId}`);
328
327
  }
329
- // Fetch prompt metadata (no instructions)
330
- const promptResults = await Promise.all(promptIds.map(async (promptId) => {
331
- const promptData = await this.callRunPromptChain('prompt', promptId);
332
- return {
333
- id: promptId,
334
- name: promptData.name,
335
- order: promptData.order,
336
- description: promptData.description || ''
337
- };
338
- }));
339
- const sortedPrompts = promptResults.sort((a, b) => (a.order || 0) - (b.order || 0));
328
+ const sortedPrompts = prompts
329
+ .map((p) => ({
330
+ id: p.prompt_id,
331
+ name: p.name || '',
332
+ order: p.order || 0,
333
+ description: p.description || ''
334
+ }))
335
+ .sort((a, b) => (a.order || 0) - (b.order || 0));
340
336
  const workflowDocument = {
341
337
  skill_id: workflowId,
342
338
  name: workflowMeta?.name || promptName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secondbrainos-mcp-server",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Second Brain OS MCP Server for Claude Desktop",
5
5
  "type": "module",
6
6
  "main": "build/index.js",