Skip to main content
Glama
dazeb

Markdown Downloader

get_download_directory

Retrieve the configured download directory used by the Markdown Downloader for saving webpages as markdown files, ensuring organized storage of downloaded content.

Instructions

Get the current download directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'get_download_directory' tool. Retrieves the current download directory from the configuration and returns it as text content.
    if (request.params.name === 'get_download_directory') {
      const config = getConfig();
      return {
        content: [
          {
            type: 'text',
            text: config.downloadDirectory
          }
        ]
      };
    }
  • src/index.ts:159-166 (registration)
    Registration of the 'get_download_directory' tool in the listTools response, including name, description, and input schema (no required parameters).
    {
      name: 'get_download_directory',
      description: 'Get the current download directory',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • Input schema for the 'get_download_directory' tool: an empty object (no parameters).
    inputSchema: {
      type: 'object',
      properties: {}
    }
  • getConfig() helper function that loads or initializes the configuration containing the downloadDirectory, with fallback to platform-specific default.
    function getConfig(): MarkdownDownloaderConfig {
      try {
        fs.ensureDirSync(CONFIG_DIR);
        if (!fs.existsSync(CONFIG_FILE)) {
          // Default to platform-specific directory if no config exists
          const defaultDownloadDir = getDefaultDownloadDir();
          const defaultConfig: MarkdownDownloaderConfig = {
            downloadDirectory: defaultDownloadDir
          };
          fs.writeJsonSync(CONFIG_FILE, defaultConfig);
          fs.ensureDirSync(defaultConfig.downloadDirectory);
          return defaultConfig;
        }
        return fs.readJsonSync(CONFIG_FILE);
      } catch (error) {
        console.error('Error reading config:', error);
        // Fallback to default
        const defaultDownloadDir = getDefaultDownloadDir();
        return {
          downloadDirectory: defaultDownloadDir
        };
      }
    }
  • getDefaultDownloadDir() helper that provides the platform-specific default download directory path.
    const getDefaultDownloadDir = () => {
      return process.platform === 'win32'
        ? path.join(homedir, 'Documents', 'markdown-downloads')
        : path.join(homedir, '.markdown-downloads');
    };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action is to 'Get', implying a read-only operation, but doesn't specify if this requires permissions, what happens if no directory is set (e.g., returns null or error), or any rate limits. This leaves significant gaps in understanding the tool's behavior.

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, clear sentence with no wasted words, making it highly concise and front-loaded. Every part of the sentence directly contributes to understanding the tool's purpose, earning its place effectively.

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 tool has no parameters and no output schema, the description should compensate by providing more context, such as what the return value looks like (e.g., a string path or error message) or behavioral details. It only states the action, leaving the agent unsure about the output format or potential edge cases, making it incomplete for effective use.

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 the schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, but it implicitly confirms no inputs are required by focusing on the action alone. A baseline of 4 is appropriate as it adequately handles 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 action ('Get') and resource ('current download directory'), making the purpose immediately understandable. It doesn't distinguish from siblings like 'set_download_directory' or 'list_downloaded_files', which would require explicit comparison, so it falls short of a perfect 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 'list_downloaded_files' or 'set_download_directory'. It lacks any context about prerequisites, such as whether a download directory must be set first, or when this tool is appropriate over others.

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

Related 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/dazeb/markdown-downloader'

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