Skip to main content
Glama
jakedx6

Helios-9 MCP Server

by jakedx6

get_conversations

Retrieve AI conversations for a project with filters for conversation type, related task or document, and message content inclusion.

Instructions

Retrieve AI conversations for a project with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe project ID to get conversations for
limitNoMaximum number of conversations to return
conversation_typeNoFilter by conversation type
related_toNoFilter by related task or document ID
include_messagesNoWhether to include full message content

Implementation Reference

  • The main handler function for the 'get_conversations' tool. Validates inputs via GetConversationsSchema, calls getConversationsFromDatabase, computes analytics (conversation types, total messages, average length, recent activity), and returns the conversations along with analytics and applied filters.
    export const getConversations = requireAuth(async (args: any) => {
      const { project_id, limit, conversation_type, related_to, include_messages } = GetConversationsSchema.parse(args)
      
      logger.info('Getting conversations', { project_id, conversation_type, related_to, limit })
    
      // Get conversations from database
      const conversations = await getConversationsFromDatabase({
        project_id,
        limit,
        conversation_type,
        related_to,
        include_messages
      })
    
      // Add analytics
      const analytics = {
        total_conversations: conversations.length,
        conversation_types: conversations.reduce((acc, conv) => {
          const type = conv.metadata?.context?.conversation_type || 'general'
          acc[type] = (acc[type] || 0) + 1
          return acc
        }, {} as Record<string, number>),
        total_messages: conversations.reduce((sum, conv) => sum + (conv.metadata?.message_count || 0), 0),
        average_length: conversations.length > 0 
          ? conversations.reduce((sum, conv) => sum + (conv.metadata?.message_count || 0), 0) / conversations.length 
          : 0,
        recent_activity: conversations.filter(conv => 
          new Date(conv.created_at).getTime() > Date.now() - (7 * 24 * 60 * 60 * 1000)
        ).length
      }
    
      return {
        conversations,
        analytics,
        filters_applied: { conversation_type, related_to }
      }
    })
  • Zod schema definition for the get_conversations tool inputs. Validates project_id (UUID), limit (1-100, default 20), conversation_type (enum), related_to (UUID), and include_messages (boolean, default true).
    const GetConversationsSchema = z.object({
      project_id: z.string().uuid(),
      limit: z.number().int().positive().max(100).default(20),
      conversation_type: z.enum(['task_discussion', 'document_review', 'project_planning', 'troubleshooting', 'general']).optional(),
      related_to: z.string().uuid().optional(), // task_id or document_id
      include_messages: z.boolean().default(true)
    })
  • MCPTool definition (tool registration object) with name 'get_conversations', description, and JSON Schema inputSchema matching the Zod schema. Exported as part of conversationTools and conversationHandlers.
    export const getConversationsTool: MCPTool = {
      name: 'get_conversations',
      description: 'Retrieve AI conversations for a project with optional filtering',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            format: 'uuid',
            description: 'The project ID to get conversations for'
          },
          limit: {
            type: 'number',
            minimum: 1,
            maximum: 100,
            default: 20,
            description: 'Maximum number of conversations to return'
          },
          conversation_type: {
            type: 'string',
            enum: ['task_discussion', 'document_review', 'project_planning', 'troubleshooting', 'general'],
            description: 'Filter by conversation type'
          },
          related_to: {
            type: 'string',
            format: 'uuid',
            description: 'Filter by related task or document ID'
          },
          include_messages: {
            type: 'boolean',
            default: true,
            description: 'Whether to include full message content'
          }
        },
        required: ['project_id']
      }
    }
  • Export map that registers the handler function under the key 'get_conversations' in conversationHandlers, which is then spread into allHandlers in src/index.ts.
    export const conversationHandlers = {
      save_conversation: saveConversation,
      get_conversations: getConversations,
      analyze_conversation: analyzeConversation,
      extract_action_items: extractActionItems,
      generate_conversation_summary: generateConversationSummary
    }
  • Database helper function (placeholder) that receives filters (project_id, limit, conversation_type, related_to, include_messages) and returns conversation data. Currently returns an empty array; intended to be implemented in the supabase service.
    async function getConversationsFromDatabase(filters: any): Promise<any[]> {
      // This would be implemented in the supabase service
      return []
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden but only states 'Retrieve AI conversations with optional filtering'. It does not disclose important behavioral traits like pagination, sorting, or what is returned when 'include_messages' is false.

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 concise sentence that front-loads the main action. It is efficient but could include more detail without losing brevity.

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?

No output schema is provided, and the description does not mention what the tool returns (e.g., conversation metadata, messages). For a retrieval tool with 5 parameters, the description lacks completeness regarding behavior and output.

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 description coverage is 100%, so the parameters are already well-documented in the schema. The description mentions 'optional filtering' but does not add any specific meaning beyond what the schema already provides, resulting in a baseline score.

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 'Retrieve' and the resource 'AI conversations' for a project, including optional filtering. It effectively distinguishes from sibling tools like 'save_conversation' or 'analyze_conversation' by focusing on retrieval.

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?

The description provides no guidance on when to use this tool versus alternatives, such as 'analyze_conversation' or 'generate_conversation_summary'. It does not mention context, prerequisites, or when not to use it.

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/jakedx6/helios9-MCP-Server'

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