Skip to main content
Glama
mcp-file-downloader

mcp-file-downloader

by QianJue-CN

pre_request

Establishes session state with a preliminary HTTP request, enabling downloads from links that require cookies, headers, or Cloudflare checks.

Instructions

发送预请求以建立会话状态,用于处理需要特定会话状态的下载链接(如Cloudflare测试链接)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "pre_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes要访问的URL,通常是主页面或登录页面
bodyNo请求体(仅用于POST请求)
methodNoHTTP方法GET
headersNo额外的请求头
refererNo设置Referer头
timeoutNo请求超时时间(毫秒)
sessionIdNo会话ID,如果不提供将自动生成
userAgentNo自定义User-Agent
followRedirectsNo是否跟随重定向

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/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. It does disclose the key side effect — that this establishes session state as a prerequisite for later requests — which is real value beyond the name, but it says nothing about whether state is persisted server-side or keyed by sessionId, whether auth headers/cookies must be supplied, or what the response contains.

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

Conciseness4/5

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

A single front-loaded sentence that names the action first and the motivating scenario second, with a parenthetical example — no filler. It is dense rather than bloated, though the terseness leaves no room for prerequisites.

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?

This is a 9-parameter, nested-object tool with no annotations and no output schema, so the description needs to explain what comes back and how the established session is consumed downstream. It does neither, leaving the agent unable to tell whether the tool returns cookies/sessionId or how to feed that into subsequent download calls.

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

Parameters3/5

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

Schema coverage is 100%, with per-parameter descriptions for url, method, headers, referer, timeout, sessionId, userAgent and followRedirects, so the schema already does the explanatory work. The description adds no parameter-specific meaning (e.g., what sessionId should be reused across calls), so the baseline 3 applies.

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 states a specific verb and object ('发送预请求' to '建立会话状态') and scopes it to download links that require session state, with Cloudflare test links as a concrete example. An agent can tell this is a session-priming step rather than the download itself, though it never names a sibling (e.g., download_file or configure_advanced_session) to sharpen the boundary.

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

Usage Guidelines4/5

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

It gives clear usage context: call this when a download link requires pre-existing session state, such as Cloudflare-protected test links. It stops short of explicit exclusions (e.g., 'do not use for plain direct URLs') and does not say how the resulting session relates to download_file calls.

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