Skip to main content
Glama
jakedx6
by jakedx6

get_initiative_context

Retrieve detailed context about a specific initiative to enhance AI understanding of project scope, requirements, and relationships.

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 execution handler for the 'get_initiative_context' tool. Validates input using GetInitiativeSchema, logs the request, fetches context from supabaseService, and returns it.
    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 including name, description, and input schema JSON for 'get_initiative_context'.
    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'] } }
  • Zod schema used for input validation in the handler.
    const GetInitiativeSchema = z.object({ initiative_id: z.string().uuid() })
  • Registration mapping of tool name to handler function, exported for use in main tool registry.
    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 }
  • Helper method in API client that makes the actual API request to fetch initiative context.
    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