Skip to main content
Glama
SunZhi-Will

Website to Markdown MCP Server

by SunZhi-Will

list_configured_websites

Retrieve all websites configured for conversion to Markdown with AI-powered content cleanup and ad removal.

Instructions

List all configured websites

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler logic for the 'list_configured_websites' tool. It maps over the configured websites and formats them into a markdown list, returning it as tool content.
    if (name === 'list_configured_websites') {
      const websiteList = config.websites.map(site => 
        `- **${site.name}**: ${site.url}${site.description ? ` - ${site.description}` : ''}`
      ).join('\n');
    
      return {
        content: [
          {
            type: 'text',
            text: `# Configured Websites\n\n${websiteList}\n\nYou can:\n1. Ask any question directly, I will automatically search relevant websites\n2. Use \`fetch_website\` tool to fetch specific websites\n3. Use corresponding dedicated tools to fetch configured websites`
          }
        ]
      };
    }
  • src/index.ts:560-567 (registration)
    Registration of the 'list_configured_websites' tool in the ListToolsRequestSchema handler, including its schema (empty input).
    {
      name: 'list_configured_websites',
      description: 'List all configured websites',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    }
  • Zod schema for validating the configuration object that contains the list of websites used by the tool.
    const ConfigSchema = z.object({
      websites: z.array(z.object({
        name: z.string(),
        url: z.string().url(),
        description: z.string().optional()
      }))
    });
  • Helper function that loads the website configuration from environment variables, specified file, default file, or built-in defaults, and parses it using ConfigSchema.
    const getConfig = () => {
      // 1. First check environment variable specified config file path
      const configPath = process.env.WEBSITES_CONFIG_PATH;
      if (configPath) {
        try {
          let fullPath = configPath;
          // If relative path, relative to current working directory
          if (!configPath.startsWith('/') && !configPath.includes(':')) {
            fullPath = join(process.cwd(), configPath);
          }
          
          if (existsSync(fullPath)) {
            const configFile = readFileSync(fullPath, 'utf-8');
            const parsed = JSON.parse(configFile);
            console.error(`Loading configuration from specified file: ${fullPath}`);
            return ConfigSchema.parse(parsed);
          } else {
            console.error(`Specified configuration file does not exist: ${fullPath}`);
          }
        } catch (error) {
          console.error('Failed to read specified configuration file:', error);
        }
      }
    
      // 2. Try to get configuration from environment variables (backward compatibility)
      const configJson = process.env.WEBSITES_CONFIG;
      if (configJson) {
        try {
          const parsed = JSON.parse(configJson);
          console.error('Loading configuration from environment variable');
          return ConfigSchema.parse(parsed);
        } catch (error) {
          console.error('Environment variable configuration parsing error:', error);
        }
      }
    
      // 3. Try to read default config.json file
      const defaultConfigPath = join(__dirname, '..', 'config.json');
      if (existsSync(defaultConfigPath)) {
        try {
          const configFile = readFileSync(defaultConfigPath, 'utf-8');
          const parsed = JSON.parse(configFile);
          console.error(`Loading configuration from default file: ${defaultConfigPath}`);
          return ConfigSchema.parse(parsed);
        } catch (error) {
          console.error('Failed to read default configuration file:', error);
        }
      }
    
      // 4. Use built-in default configuration
      console.error('Using built-in default configuration');
      return {
        websites: [
          {
            name: "tailwind_css",
            url: "https://tailwindcss.com",
            description: "Tailwind CSS Official Website"
          },
          {
            name: "nextjs",
            url: "https://nextjs.org", 
            description: "Next.js Official Documentation"
          },
          {
            name: "react",
            url: "https://react.dev",
            description: "React Official Documentation"
          }
        ]
      };
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('List') but doesn't add context such as pagination, rate limits, authentication needs, or what 'configured' entails. This is a significant gap for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded and appropriately sized for a simple tool, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'configured' means, the return format, or behavioral traits like safety or performance. For a tool with no structured data support, this leaves critical gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so no parameter information is needed. The description doesn't add parameter details, but that's appropriate here, warranting a baseline score above 3 due to the lack of parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all configured websites'), providing a specific purpose. However, it doesn't differentiate from sibling tools like 'fetch_website' or 'fetch_example_site', which might have overlapping functionality, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like the sibling tools. It lacks explicit context, exclusions, or recommendations, leaving the agent to infer usage based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/SunZhi-Will/website-to-markdown-mcp'

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