list_sips
Discover all available Stacks Improvement Proposals (SIPs) to identify blockchain standards for development compliance and implementation guidance.
Instructions
Get a list of all available SIPs (Stacks Improvement Proposals) in the knowledge base. Use this first to discover available Stacks standards.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:46-64 (handler)The complete tool definition including handler logic for 'list_sips', which fetches available SIPs, identifies those with Clarity code, formats a list, and returns it as text.server.addTool({ name: "list_sips", description: "Get a list of all available SIPs (Stacks Improvement Proposals) in the knowledge base. Use this first to discover available Stacks standards.", parameters: z.object({}), execute: async () => { const sips = getAvailableSIPs(); const sipsWithCode = getSIPsWithClarityCode(); const list = sips.map((num) => { const hasCode = sipsWithCode.includes(num) ? " 🔥 (with Clarity code)" : ""; return `- SIP-${num.padStart(3, "0")}${hasCode}`; }).join("\n"); return { text: `Available SIPs:\n${list}\n\n🔥 = Contains Clarity smart contract code\n\nUse get_sip with the SIP number to retrieve full content.\nKey standards: SIP-009 (NFT), SIP-010 (FT), SIP-012 (Performance)`, type: "text", }; }, });
- src/server.ts:49-49 (schema)Input schema for list_sips: no parameters required.parameters: z.object({}),
- src/utils/index.ts:137-148 (helper)Helper function that scans the stacks-clarity-standards directory for sip-XXX directories and returns sorted array of SIP numbers.export const getAvailableSIPs = (): string[] => { try { const dirs = fs.readdirSync(stacksClarityStandardsDir); return dirs .filter((dir) => dir.startsWith("sip-")) .map((dir) => dir.replace("sip-", "")) .sort((a, b) => parseInt(a) - parseInt(b)); } catch (err) { console.error(`Error reading SIPs directory: ${err}`); return []; } };
- src/utils/index.ts:226-246 (helper)Helper function that identifies SIPs containing Clarity smart contract files (.clar) by scanning each SIP directory.export const getSIPsWithClarityCode = (): string[] => { const allSIPs = getAvailableSIPs(); const sipsWithCode: string[] = []; for (const sipNum of allSIPs) { try { const sipDir = pathJoin(stacksClarityStandardsDir, `sip-${sipNum.padStart(3, "0")}`); if (fs.existsSync(sipDir)) { const files = fs.readdirSync(sipDir); const clarFiles = files.filter((file) => file.endsWith(".clar")); if (clarFiles.length > 0) { sipsWithCode.push(sipNum); } } } catch (error) { console.error(`Error checking SIP-${sipNum} for Clarity code:`, error); } } return sipsWithCode; };