check_version
Verify end-of-life (EOL) status and support details for specific software versions. Input product name and version to retrieve lifecycle, security status, and upgrade guidance in real-time.
Instructions
Check EOL status and support information for software versions
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product | Yes | Software product name (e.g., python, nodejs, ubuntu) | |
| version | No | Specific version to check (e.g., 3.8, 16, 20.04) |
Input Schema (JSON Schema)
{
"properties": {
"product": {
"description": "Software product name (e.g., python, nodejs, ubuntu)",
"examples": [
"python",
"nodejs",
"ubuntu"
],
"type": "string"
},
"version": {
"description": "Specific version to check (e.g., 3.8, 16, 20.04)",
"examples": [
"3.8",
"16",
"20.04"
],
"type": "string"
}
},
"required": [
"product"
],
"type": "object"
}
Implementation Reference
- src/index.ts:610-661 (handler)The handler function executes the 'check_version' tool logic: validates product, fetches EOL cycles from endoflife.date API for the product, filters by version if provided, caches the query, and returns the JSON response.private async handleCheckVersion(args: CheckVersionArgs) { const { product, version } = args; // Validate product exists if (!this.availableProducts.includes(product)) { return { content: [{ type: "text", text: `Invalid product: ${product}. Use list_products tool to see available products.` }], isError: true }; } try { const response = await this.axiosInstance.get(`/${product}.json`); const cycles = response.data as EOLCycle[]; const filteredCycles = version ? cycles.filter(cycle => cycle.cycle.startsWith(version)) : cycles; this.recentQueries.unshift({ product, version, response: filteredCycles, timestamp: new Date().toISOString() }); if (this.recentQueries.length > API_CONFIG.MAX_CACHED_QUERIES) { this.recentQueries.pop(); } return { content: [{ type: "text", text: JSON.stringify(filteredCycles, null, 2) }] }; } catch (error) { if (axios.isAxiosError(error)) { return { content: [{ type: "text", text: `EOL API error: ${error.response?.data?.message ?? error.message}` }], isError: true }; } throw error; } }
- src/index.ts:285-302 (registration)The tool registration in the ListToolsRequestSchema response, defining name, description, and inputSchema for 'check_version'.name: "check_version", description: "Check EOL status and support information for software versions", inputSchema: { type: "object", properties: { product: { type: "string", description: "Software product name (e.g., python, nodejs, ubuntu)", examples: ["python", "nodejs", "ubuntu"] }, version: { type: "string", description: "Specific version to check (e.g., 3.8, 16, 20.04)", examples: ["3.8", "16", "20.04"] } }, required: ["product"] }
- src/types.ts:19-37 (schema)TypeScript interface and type guard (validator) for CheckVersionArgs used in 'check_version' tool.export interface CheckVersionArgs { product: string; version?: string; } export interface ListProductsArgs { filter?: string; } // Type guards export function isValidCheckVersionArgs(args: any): args is CheckVersionArgs { return ( typeof args === "object" && args !== null && "product" in args && typeof args.product === "string" && (args.version === undefined || typeof args.version === "string") ); }