Skip to main content
Glama
efremidze

swift-patterns-mcp

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
NameRequiredDescriptionDefault

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
    \`\`\`
    `);
    };
  • Registration of the list_content_sources tool handler.
    registerHandler('list_content_sources', listContentSourcesHandler);

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/efremidze/swift-mcp'

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