Skip to main content
Glama
jakedx6
by jakedx6

search_workspace

Search across projects, initiatives, tasks, documents, and milestones with initiative awareness to find relevant workspace entities using queries and filters.

Instructions

Search across all entity types with initiative awareness

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query to use
filtersNo
limitNo

Implementation Reference

  • The core handler function for the 'search_workspace' MCP tool. It validates input using Zod schema, logs the search parameters, delegates to supabaseService.searchWorkspace API call, and returns the results.
    export const searchWorkspace = requireAuth(async (args: any) => { const { query, filters, limit } = SearchWorkspaceSchema.parse(args) logger.info('Searching workspace', { query, filters, limit }) const results = await supabaseService.searchWorkspace(query, filters, limit) return results })
  • Zod schema used for input validation in the search_workspace handler.
    const SearchWorkspaceSchema = z.object({ query: z.string().min(2), filters: z.object({ type: z.enum(['project', 'initiative', 'task', 'document', 'milestone']).optional(), project_id: z.string().uuid().optional(), initiative_id: z.string().uuid().optional(), status: z.string().optional() }).optional(), limit: z.number().int().positive().max(100).default(20) })
  • MCPTool object definition that registers the 'search_workspace' tool, including name, description, and JSON input schema.
    export const searchWorkspaceTool: MCPTool = { name: 'search_workspace', description: 'Search across all entity types with initiative awareness', inputSchema: { type: 'object', properties: { query: { type: 'string', minLength: 2, description: 'The search query to use' }, filters: { type: 'object', properties: { type: { type: 'string', enum: ['project', 'initiative', 'task', 'document', 'milestone'] }, project_id: { type: 'string', format: 'uuid' }, initiative_id: { type: 'string', format: 'uuid' }, status: { type: 'string' } } }, limit: { type: 'number', minimum: 1, maximum: 100, default: 20 } }, required: ['query'] } }
  • Object exporting all initiative-related handlers, including 'search_workspace', likely used for tool registration in the MCP server.
    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 }
  • API client helper method called by the tool handler to perform the actual search by POSTing to the server /api/mcp/search endpoint.
    async searchWorkspace(query: string, filters?: any, limit?: number): Promise<any> { const response = await this.request<any>('/api/mcp/search', { method: 'POST', body: JSON.stringify({ query, filters, limit }), }) return response }

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