Skip to main content
Glama
jakedx6
by jakedx6

get_initiative

Retrieve detailed information about a specific project initiative using its unique identifier to access comprehensive data and manage project elements.

Instructions

Get detailed information about a specific initiative

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initiative_idYesThe unique identifier of the initiative

Implementation Reference

  • The handler function for the 'get_initiative' tool. It validates input using GetInitiativeSchema, fetches the initiative data from supabaseService, computes completion statistics and percentages, and returns an enriched initiative object.
    export const getInitiative = requireAuth(async (args: any) => { const { initiative_id } = GetInitiativeSchema.parse(args) logger.info('Getting initiative details', { initiative_id }) const initiative = await supabaseService.getInitiative(initiative_id) // If the API returns enriched data with tasks, milestones, and documents, calculate from that const statistics = { total_tasks: initiative.tasks?.length || initiative.task_count || 0, completed_tasks: initiative.tasks?.filter((t: any) => t.status === 'done').length || 0, total_milestones: initiative.milestones?.length || initiative.milestone_count || 0, completed_milestones: initiative.milestones?.filter((m: any) => m.status === 'completed').length || 0, total_documents: initiative.documents?.length || initiative.document_count || 0 } const completion_percentage = statistics.total_tasks > 0 ? Math.round((statistics.completed_tasks / statistics.total_tasks) * 100) : 0 return { initiative: { ...initiative, completion_percentage, statistics } } })
  • Zod input validation schema used in the get_initiative handler.
    const GetInitiativeSchema = z.object({ initiative_id: z.string().uuid() })
  • MCPTool object registering the 'get_initiative' tool with name, description, and JSON input schema.
    export const getInitiativeTool: MCPTool = { name: 'get_initiative', description: 'Get detailed information about a specific initiative', inputSchema: { type: 'object', properties: { initiative_id: { type: 'string', format: 'uuid', description: 'The unique identifier of the initiative' } }, required: ['initiative_id'] } }

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