Skip to main content
Glama
jakedx6
by jakedx6

list_initiatives

Retrieve and filter project initiatives by status, priority, or search terms to manage organizational goals and track progress effectively.

Instructions

List all initiatives with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoFilter by project
statusNoFilter by status
priorityNoFilter by priority
searchNoSearch initiatives by name or objective
limitNoMaximum number of initiatives to return

Implementation Reference

  • The main handler function for the 'list_initiatives' tool. It validates input using ListInitiativesSchema, logs the request, fetches initiatives from supabaseService.getInitiatives with filters and sorting, and returns the list along with total count and applied filters.
    export const listInitiatives = requireAuth(async (args: any) => { const { project_id, status, priority, search, limit } = ListInitiativesSchema.parse(args) logger.info('Listing initiatives', { project_id, status, priority, search, limit }) const initiatives = await supabaseService.getInitiatives( { project_id, status, priority, search }, { limit }, { field: 'updated_at', order: 'desc' } ) // The API already returns enriched initiatives with counts return { initiatives: initiatives, total: initiatives.length, filters_applied: { project_id, status, priority, search } } })
  • Zod schema used for input validation in the list_initiatives handler, defining optional filters for project_id, status, priority, search, and limit.
    const ListInitiativesSchema = z.object({ project_id: z.string().uuid().optional(), status: z.enum(['planning', 'active', 'on_hold', 'completed', 'cancelled']).optional(), priority: z.enum(['critical', 'high', 'medium', 'low']).optional(), search: z.string().optional(), limit: z.number().int().positive().max(100).default(20) })
  • MCPTool object registering the 'list_initiatives' tool with name, description, and JSON schema for input validation.
    export const listInitiativesTool: MCPTool = { name: 'list_initiatives', description: 'List all initiatives with optional filtering', inputSchema: { type: 'object', properties: { project_id: { type: 'string', format: 'uuid', description: 'Filter by project' }, status: { type: 'string', enum: ['planning', 'active', 'on_hold', 'completed', 'cancelled'], description: 'Filter by status' }, priority: { type: 'string', enum: ['critical', 'high', 'medium', 'low'], description: 'Filter by priority' }, search: { type: 'string', description: 'Search initiatives by name or objective' }, limit: { type: 'number', minimum: 1, maximum: 100, default: 20, description: 'Maximum number of initiatives to return' } } } }
  • Export of all initiative handlers including 'list_initiatives', likely imported elsewhere for central tool registration.
    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 }

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