search_components
Find PrimeNG UI components by searching with keywords to identify suitable elements for Angular development projects.
Instructions
Busca componentes de PrimeNG que coincidan con una consulta
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Término de búsqueda (ej: 'input', 'table', 'menu') |
Implementation Reference
- src/tools/SearchComponentsTool.ts:16-28 (handler)The execute method implements the core logic of the search_components tool: extracts the query, validates it, filters available components case-insensitively, formats results, and returns a ToolResponse.async execute(args: Record<string, any>): Promise<ToolResponse> { const query = args.query as string; if (!query) { return this.createErrorResponse('Search query is required'); } const results = this.availableComponents.filter(comp => comp.toLowerCase().includes(query.toLowerCase()) ); return this.createResponse(formatSearchResults(results, query)); }
- src/models/ToolSchemas.ts:31-46 (schema)Creates the Tool schema for search_components, defining name, description, and inputSchema requiring a 'query' string.export function createSearchComponentsSchema(): Tool { return { name: "search_components", description: "Busca componentes de PrimeNG que coincidan con una consulta", inputSchema: { type: "object", properties: { query: { type: "string", description: "Término de búsqueda (ej: 'input', 'table', 'menu')", }, }, required: ["query"], }, }; }
- src/server/PrimeNGServer.ts:208-209 (registration)Registers the tool execution handler in the CallToolRequestSchema switch statement, delegating to searchComponentsTool.run().case "search_components": return await this.searchComponentsTool.run(args);
- src/server/PrimeNGServer.ts:182-182 (registration)Registers the tool schema in the list of tools returned by ListToolsRequestSchema.createSearchComponentsSchema(),
- src/server/PrimeNGServer.ts:139-139 (registration)Instantiates the SearchComponentsTool instance during server initialization.this.searchComponentsTool = new SearchComponentsTool(this.components);