Skip to main content
Glama

search_components

Find PrimeNG UI components by searching with keywords like 'input', 'table', or 'menu' to locate the right Angular components for your project needs.

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

  • Core implementation of the search_components tool. The SearchComponentsTool class extends BaseTool and provides the execute method that performs filtering of available components based on the input query and formats the results.
    export class SearchComponentsTool extends BaseTool { private availableComponents: string[]; constructor(availableComponents: string[]) { super('search_components'); this.availableComponents = availableComponents; } 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)); } }
  • Schema definition for the search_components tool, including input schema with required 'query' string parameter.
    /** * Creates the schema for search_components tool */ 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"], }, }; }
  • Tool dispatch registration in the CallToolRequestSchema handler's switch statement, calling the tool's run method.
    case "search_components": return await this.searchComponentsTool.run(args);
  • Registration of the tool schema in the listTools response (tools array).
    createSearchComponentsSchema(),
  • Instantiation of the SearchComponentsTool instance in the server's initializeTools method.
    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