Skip to main content
Glama

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
NameRequiredDescriptionDefault
queryYesTérmino de búsqueda (ej: 'input', 'table', 'menu')

Implementation Reference

  • 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)); }
  • 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"], }, }; }
  • Registers the tool execution handler in the CallToolRequestSchema switch statement, delegating to searchComponentsTool.run().
    case "search_components": return await this.searchComponentsTool.run(args);
  • Registers the tool schema in the list of tools returned by ListToolsRequestSchema.
    createSearchComponentsSchema(),
  • Instantiates the SearchComponentsTool instance during server initialization.
    this.searchComponentsTool = new SearchComponentsTool(this.components);

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/hnkatze/PrimeNG_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server