Skip to main content
Glama
thana0623

prompts-mcp-server

by thana0623

bootstrap

Initializes the AI coding assistant by automatically loading project context, daily logs, recent activities, summaries, todos, and module records in one step.

Instructions

【一键启动】自动读取传递链(context.md + daily + recent-5 + summary-10 + todos + 模块记录)。智能体启动时第一步调用。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'bootstrap'. Calls the bootstrap() function and formatBootstrap() to produce the response.
    private async handleBootstrap() {
      const result = bootstrap();
      const formatted = formatBootstrap(result);
    
      return {
        content: [{ type: 'text', text: formatted }],
      };
    }
  • The BootstrapResult interface defines the return type of bootstrap(), containing all context data like context.md, daily log, recent-5, summary-10, todos, logState, and modules.
    export interface BootstrapResult {
      context: LoadedContext;
      daily: LoadedContext | null;
      recent5: LoadedContext;
      summary10: LoadedContext;
      todos: LoadedContext;
      logState: LogState | null;
      modules: string[];
    }
  • The core bootstrap() function implementation – loads all prompts context (context.md, daily, recent-5, summary-10, todos, log-state.json, module list) and returns them as a BootstrapResult.
    export function bootstrap(): BootstrapResult {
      const context = loadContext();
      const daily = loadDaily();
      const recent5 = loadRecent5();
      const summary10 = loadSummary10();
      const todos = loadTodos();
      const logState = loadLogState();
      const modules = listModules();
    
      return { context, daily, recent5, summary10, todos, logState, modules };
    }
  • Formats the bootstrap result into human-readable text with checkmarks, context summary, recent-5, summary-10, todos, log state, and module list.
    export function formatBootstrap(result: BootstrapResult): string {
      const lines: string[] = [];
    
      lines.push('# 🚀 Prompts MCP Server - Bootstrap');
      lines.push('');
      lines.push('## ✅ 加载清单');
      lines.push('');
      lines.push(`✓ context.md: ${result.context.content ? '已加载' : '未找到'}`);
      lines.push(`✓ daily log: ${result.daily ? '已加载' : '今日无日志'}`);
      lines.push(`✓ recent-5.md: ${result.recent5.content ? '已加载' : '未找到'}`);
      lines.push(`✓ summary-10.md: ${result.summary10.content ? '已加载' : '未找到'}`);
      lines.push(`✓ todos.md: ${result.todos.content ? '已加载' : '未找到'}`);
      lines.push(`✓ 模块记录: ${result.modules.length > 0 ? result.modules.join(', ') : '无'}`);
      lines.push('');
    
      // Context 摘要
      if (result.context.content) {
        lines.push('## 📋 Context 摘要');
        lines.push('');
        const ctxLines = result.context.content.split('\n').slice(0, 20);
        lines.push(...ctxLines);
        if (result.context.content.split('\n').length > 20) lines.push('... (截断)');
        lines.push('');
      }
    
      // Recent 5
      if (result.recent5.content) {
        lines.push('## 🔄 最近 5 条');
        lines.push('');
        lines.push(result.recent5.content);
        lines.push('');
      }
    
      // Summary
      if (result.summary10.content) {
        lines.push('## 📊 摘要状态');
        lines.push('');
        lines.push(result.summary10.content);
        lines.push('');
      }
    
      // Todos
      if (result.todos.content) {
        lines.push('## 📝 待办事项');
        lines.push('');
        lines.push(result.todos.content);
        lines.push('');
      }
    
      // Log state
      if (result.logState) {
        lines.push('## 📈 日志状态');
        lines.push('');
        lines.push(`- 下一个 Entry ID: ${result.logState.nextEntryId}`);
        lines.push(`- 当前窗口: ${result.logState.windowId}`);
        lines.push(`- 窗口进度: ${result.logState.windowCount}/10`);
        lines.push('');
      }
    
      // Modules
      if (result.modules.length > 0) {
        lines.push('## 📦 已有模块记录');
        lines.push('');
        for (const mod of result.modules) {
          lines.push(`- \`${mod}\``);
        }
        lines.push('');
      }
    
      return lines.join('\n');
    }
  • src/index.ts:101-108 (registration)
    Tool registration: defines the 'bootstrap' tool with name, description, and inputSchema (no parameters required).
    {
      name: 'bootstrap',
      description: '【一键启动】自动读取传递链(context.md + daily + recent-5 + summary-10 + todos + 模块记录)。智能体启动时第一步调用。',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
Behavior3/5

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

No annotations provided, so description carries full burden. It describes a read operation but does not explicitly state it is read-only or mention other behavioral traits like permissions or side effects. Adequate but minimal.

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?

One sentence with a clear title-like mark. Every word contributes to purpose and usage. No waste.

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

Completeness4/5

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

Given no parameters and no output schema, description is complete for a simple bootstrap. It specifies the files read and when to call. Could add return value context, but not essential.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters in input schema, so baseline is 4. Description adds context by listing the files read, but no param details needed.

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

Purpose5/5

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

The description clearly states the verb 'reads' and the resource 'delivery chain (context.md + daily + recent-5 + summary-10 + todos + module records)', and specifies it's the first step when the agent starts. This distinguishes it from siblings like init_prompts.

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

Usage Guidelines4/5

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

Explicitly states when to use: 'called as the first step when the agent starts'. No explicit alternatives or when-not-to-use, but context is clear for an initialization tool.

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/thana0623/prompts-mcp-server'

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