Skip to main content
Glama
jakedx6
by jakedx6

get_initiative_context

Retrieve detailed context about project initiatives to enhance AI understanding and decision-making for project management tasks.

Instructions

Get rich context about an initiative for AI understanding

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initiative_idYesThe unique identifier of the initiative

Implementation Reference

  • The main handler function that executes the tool logic. It requires authentication, validates input with Zod (GetInitiativeSchema), logs the request, fetches the initiative context from the Supabase service, and returns the context.
    export const getInitiativeContext = requireAuth(async (args: any) => { const { initiative_id } = GetInitiativeSchema.parse(args) logger.info('Getting initiative context for AI', { initiative_id }) const context = await supabaseService.getInitiativeContext(initiative_id) return { context } })
  • The MCPTool definition providing the tool's name, description, and input schema (requiring initiative_id as UUID). This is used by the MCP server for tool listing and validation.
    export const getInitiativeContextTool: MCPTool = { name: 'get_initiative_context', description: 'Get rich context about an initiative for AI understanding', inputSchema: { type: 'object', properties: { initiative_id: { type: 'string', format: 'uuid', description: 'The unique identifier of the initiative' } }, required: ['initiative_id'] } }
  • Local registration of all initiative-related handlers, mapping the tool name 'get_initiative_context' to its handler function.
    export const initiativeHandlers = { list_initiatives: listInitiatives, get_initiative: getInitiative, create_initiative: createInitiative, update_initiative: updateInitiative, get_initiative_context: getInitiativeContext, get_initiative_insights: getInitiativeInsights, search_workspace: searchWorkspace, get_enhanced_project_context: getEnhancedProjectContext, get_workspace_context: getWorkspaceContext, associate_document_with_initiative: associateDocumentWithInitiative, disassociate_document_from_initiative: disassociateDocumentFromInitiative }
  • src/index.ts:143-155 (registration)
    Global registration in the main MCP server: initiativeHandlers (including get_initiative_context) is spread into the allHandlers object used by the server to dispatch tool calls.
    this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }
  • Supporting service method (supabaseService.getInitiativeContext) called by the handler to fetch the actual initiative context data from the backend API.
    async getInitiativeContext(initiativeId: string): Promise<any> { const response = await this.request<{ context: any }>(`/api/mcp/initiatives/${initiativeId}/context`) return response.context }

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