Skip to main content
Glama
MUSE-CODE-SPACE

Vibe Coding Documentation MCP (MUSE)

muse_session_history

Manage vibe coding session history by saving, retrieving, searching, and updating sessions with code contexts and design decisions.

Instructions

Manages vibe coding session history. Save, retrieve, search, and manage past coding sessions with their code contexts and design decisions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: save (create new), get (retrieve by ID), update (modify existing), delete (remove), list (get all), search (find by keyword), stats (storage statistics)
sessionIdNoSession ID (required for get, update, delete actions)
titleNoSession title (required for save, optional for update)
summaryNoSession summary (required for save, optional for update)
tagsNoTags for categorization
codeContextsNoArray of code context objects
designDecisionsNoArray of design decision objects
metadataNoAdditional metadata
limitNoMaximum results to return (for list/search, default: 50)
offsetNoNumber of results to skip (for list, default: 0)
filterTagsNoFilter by tags (for list)
sortByNoSort field (for list, default: updatedAt)
sortOrderNoSort order (for list, default: desc)
keywordNoSearch keyword (required for search action)
searchInNoFields to search in (for search, default: all)

Implementation Reference

  • Main handler for the muse_session_history tool. Dispatches to different actions: save, get, update, delete, list, search, stats. Uses sessionStorage core module for persistence.
    export async function sessionHistoryTool(input: SessionHistoryInput): Promise<SessionHistoryOutput> {
      const { action } = input;
    
      try {
        switch (action) {
          case 'save': {
            if (!input.title || !input.summary) {
              return {
                success: false,
                action,
                error: 'title and summary are required for save action'
              };
            }
    
            const session = await saveSession({
              title: input.title,
              summary: input.summary,
              tags: input.tags || [],
              codeContexts: input.codeContexts || [],
              designDecisions: input.designDecisions || [],
              metadata: input.metadata
            });
    
            return {
              success: true,
              action,
              session,
              message: `Session saved: ${session.id}`
            };
          }
    
          case 'get': {
            if (!input.sessionId) {
              return {
                success: false,
                action,
                error: 'sessionId is required for get action'
              };
            }
    
            const session = await getSession(input.sessionId);
            if (!session) {
              return {
                success: false,
                action,
                error: `Session not found: ${input.sessionId}`
              };
            }
    
            return {
              success: true,
              action,
              session,
              message: `Session retrieved: ${session.title}`
            };
          }
    
          case 'update': {
            if (!input.sessionId) {
              return {
                success: false,
                action,
                error: 'sessionId is required for update action'
              };
            }
    
            const updates: Partial<SessionData> = {};
            if (input.title !== undefined) updates.title = input.title;
            if (input.summary !== undefined) updates.summary = input.summary;
            if (input.tags !== undefined) updates.tags = input.tags;
            if (input.codeContexts !== undefined) updates.codeContexts = input.codeContexts;
            if (input.designDecisions !== undefined) updates.designDecisions = input.designDecisions;
            if (input.metadata !== undefined) updates.metadata = input.metadata;
    
            const session = await updateSession(input.sessionId, updates);
    
            return {
              success: true,
              action,
              session,
              message: `Session updated: ${session.id}`
            };
          }
    
          case 'delete': {
            if (!input.sessionId) {
              return {
                success: false,
                action,
                error: 'sessionId is required for delete action'
              };
            }
    
            const deleted = await deleteSession(input.sessionId);
            if (!deleted) {
              return {
                success: false,
                action,
                error: `Session not found: ${input.sessionId}`
              };
            }
    
            return {
              success: true,
              action,
              message: `Session deleted: ${input.sessionId}`
            };
          }
    
          case 'list': {
            const { sessions, total } = await listSessions({
              limit: input.limit,
              offset: input.offset,
              tags: input.filterTags,
              sortBy: input.sortBy,
              sortOrder: input.sortOrder
            });
    
            return {
              success: true,
              action,
              sessions,
              total,
              message: `Found ${total} session(s)`
            };
          }
    
          case 'search': {
            if (!input.keyword) {
              return {
                success: false,
                action,
                error: 'keyword is required for search action'
              };
            }
    
            const sessions = await searchSessions(input.keyword, {
              limit: input.limit,
              searchIn: input.searchIn
            });
    
            return {
              success: true,
              action,
              sessions,
              total: sessions.length,
              message: `Found ${sessions.length} session(s) matching "${input.keyword}"`
            };
          }
    
          case 'stats': {
            const stats = await getStorageStats();
    
            return {
              success: true,
              action,
              stats,
              message: `Storage contains ${stats.totalSessions} session(s)`
            };
          }
    
          default:
            return {
              success: false,
              action,
              error: `Unknown action: ${action}`
            };
        }
      } catch (error) {
        return {
          success: false,
          action,
          error: error instanceof Error ? error.message : String(error)
        };
      }
    }
  • MCP schema definition for the muse_session_history tool, including name, description, and inputSchema with all properties (action, sessionId, title, summary, tags, etc.).
    export const sessionHistorySchema = {
      name: 'muse_session_history',
      description: 'Manages vibe coding session history. Save, retrieve, search, and manage past coding sessions with their code contexts and design decisions.',
      inputSchema: {
        type: 'object',
        properties: {
          action: {
            type: 'string',
            enum: ['save', 'get', 'update', 'delete', 'list', 'search', 'stats'],
            description: 'Action to perform: save (create new), get (retrieve by ID), update (modify existing), delete (remove), list (get all), search (find by keyword), stats (storage statistics)'
          },
          sessionId: {
            type: 'string',
            description: 'Session ID (required for get, update, delete actions)'
          },
          title: {
            type: 'string',
            description: 'Session title (required for save, optional for update)'
          },
          summary: {
            type: 'string',
            description: 'Session summary (required for save, optional for update)'
          },
          tags: {
            type: 'array',
            items: { type: 'string' },
            description: 'Tags for categorization'
          },
          codeContexts: {
            type: 'array',
            description: 'Array of code context objects'
          },
          designDecisions: {
            type: 'array',
            description: 'Array of design decision objects'
          },
          metadata: {
            type: 'object',
            description: 'Additional metadata'
          },
          limit: {
            type: 'number',
            description: 'Maximum results to return (for list/search, default: 50)'
          },
          offset: {
            type: 'number',
            description: 'Number of results to skip (for list, default: 0)'
          },
          filterTags: {
            type: 'array',
            items: { type: 'string' },
            description: 'Filter by tags (for list)'
          },
          sortBy: {
            type: 'string',
            enum: ['createdAt', 'updatedAt', 'title'],
            description: 'Sort field (for list, default: updatedAt)'
          },
          sortOrder: {
            type: 'string',
            enum: ['asc', 'desc'],
            description: 'Sort order (for list, default: desc)'
          },
          keyword: {
            type: 'string',
            description: 'Search keyword (required for search action)'
          },
          searchIn: {
            type: 'array',
            items: { type: 'string', enum: ['title', 'summary', 'tags'] },
            description: 'Fields to search in (for search, default: all)'
          }
        },
        required: ['action']
      }
    };
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as persistence behavior, side effects, or permission requirements. The word 'manages' is vague.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is clear and not overly verbose. It efficiently states the tool's purpose without unnecessary detail.

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 15 parameters, no output schema, and no annotations, the description is too brief. It does not explain return values or behavior for each action, leaving significant gaps for a tool of this complexity.

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?

Schema coverage is 100%, so all parameters have descriptions. The description adds no additional meaning beyond the schema, so baseline 3 is appropriate.

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 it manages vibe coding session history with save, retrieve, search, and manage actions. However, it does not differentiate from siblings like muse_session_stats, which also deal with sessions.

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?

No guidance on when to use this tool versus alternatives like muse_create_session_log or muse_session_stats. The description is generic and does not specify prerequisites or context.

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/MUSE-CODE-SPACE/vibe-coding-mcp'

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