Skip to main content
Glama

list_products

Browse or search software products to check end-of-life dates, support status, and security information using real-time data from the endoflife.date API.

Instructions

Browse or search available software products

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoOptional search term to filter products

Implementation Reference

  • The main handler function for the list_products tool. It filters the list of available products based on an optional filter argument and returns the JSON stringified list.
    private async handleListProducts(args: { filter?: string }) {
      const { filter } = args;
      let products = this.availableProducts;
    
      if (filter) {
        products = products.filter(p =>
          p.toLowerCase().includes(filter.toLowerCase())
        );
      }
    
      return {
        content: [{
          type: "text",
          text: JSON.stringify(products, null, 2)
        }]
      };
    }
  • TypeScript interface defining the input arguments for the list_products tool.
    export interface ListProductsArgs {
      filter?: string;
    }
  • Type guard function for validating list_products input arguments.
    export function isValidListProductsArgs(args: any): args is ListProductsArgs {
      return (
        typeof args === "object" &&
        args !== null &&
        (args.filter === undefined || typeof args.filter === "string")
      );
    }
  • src/index.ts:329-342 (registration)
    Tool registration in the listTools handler, defining name, description, and input schema.
    {
      name: "list_products",
      description: "Browse or search available software products",
      inputSchema: {
        type: "object",
        properties: {
          filter: {
            type: "string",
            description: "Optional search term to filter products",
            examples: ["python", "linux", "database"]
          }
        }
      }
    },
  • src/index.ts:407-414 (registration)
    Dispatch logic in the callTool handler that validates arguments and invokes the list_products handler.
    case "list_products":
      if (!isValidListProductsArgs(args)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          "Invalid list products arguments"
        );
      }
      return this.handleListProducts(args);

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

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/ducthinh993/mcp-server-endoflife'

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