list_content_sources
Discover available Swift and SwiftUI content sources with their current status to access curated best practices and code examples from trusted iOS developers.
Instructions
List all available content sources and their status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Handler for the list_content_sources tool. Queries the source manager and returns a formatted markdown string.
export const listContentSourcesHandler: ToolHandler = async (_args, context) => { const allSources = context.sourceManager.getAllSources(); const freeList = allSources .filter(s => s.type === 'free') .map(s => `- ✅ **${s.name}** - ${s.description}`) .join('\n'); const premiumList = allSources .filter(s => s.type === 'premium') .map(s => { const status = s.isConfigured && s.isEnabled ? '✅' : s.isConfigured ? '⚙️' : '⬜'; return `- ${status} **${s.name}** - ${s.description}${s.isConfigured ? '' : ' (Setup required)'}`; }) .join('\n'); return createTextResponse(`# Content Sources ## Free Sources (Always Available) ${freeList} ## Premium Sources (Optional) ${premiumList} ## Legend ✅ Enabled | ⚙️ Configured but disabled | ⬜ Not configured To enable premium sources: \`\`\` swift-patterns-mcp patreon setup \`\`\` `); }; - src/tools/index.ts:17-17 (registration)Registration of the list_content_sources tool handler.
registerHandler('list_content_sources', listContentSourcesHandler);