Skip to main content
Glama
jakedx6
by jakedx6

search_workspace

Search across projects, initiatives, tasks, documents, and milestones in your workspace to find relevant information quickly.

Instructions

Search across all entity types with initiative awareness

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query to use
filtersNo
limitNo

Implementation Reference

  • The primary handler function for the 'search_workspace' MCP tool. It validates input using SearchWorkspaceSchema, logs the operation, delegates to supabaseService.searchWorkspace (API client), and returns the search 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 definition for 'search_workspace', including name, description, and input schema for registration.
    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'] } }
  • Registration of the search_workspace handler in the initiativeHandlers export object, mapping the tool name to its handler function.
    search_workspace: searchWorkspace,
  • supabaseService.searchWorkspace method, which makes the actual API call to /api/mcp/search, used by the tool handler.
    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