Skip to main content
Glama
titaniumtushar

burp-mcp-plus

js_files

List JavaScript files from a specified source, with optional host regex filtering to focus on specific hosts.

Instructions

List JS files in a source, optionally filtered by host regex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
host_filterNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The @mcp.tool() decorator registers the js_files tool in the MCP server. It calls jsfiles.list_files() to do the actual work.
    @mcp.tool()
    def js_files(name: str, host_filter: str | None = None, limit: int = 200) -> str:
        """List JS files in a source, optionally filtered by host regex."""
        return json.dumps(jsfiles.list_files(name, host_filter=host_filter, limit=limit), indent=2)
  • The actual handler: list_files() looks up the JsSource by name, optionally filters by host regex, and returns a list of file records with metadata (index, host, path, version, size, url, on_disk).
    def list_files(name: str, host_filter: str | None = None, limit: int = 200) -> list[dict[str, object]]:
        src = get(name)
        records = src.records
        if host_filter:
            rx = re.compile(host_filter, re.IGNORECASE)
            records = [r for r in records if rx.search(r.host)]
        return [
            {
                "index": r.index,
                "host": r.host,
                "path": r.path,
                "version": r.version,
                "size_bytes": r.size_bytes,
                "url": r.full_url,
                "on_disk": bool(r.abs_path),
            }
            for r in records[:limit]
        ]
  • JsRecord dataclass: defines the schema for each JS file entry (index, timestamp, host, path, version, size_bytes, full_url, saved_as, abs_path).
    @dataclass
    class JsRecord:
        index: int
        timestamp: str
        host: str
        path: str
        version: str
        size_bytes: int
        full_url: str
        saved_as: str  # path as recorded in manifest
        abs_path: str  # absolute path on disk if found
  • JsSource dataclass: defines the schema for a JS source (name, manifest_path, records).
    @dataclass
    class JsSource:
        name: str
        manifest_path: str
        records: list[JsRecord] = field(default_factory=list)
  • register() helper: loads a manifest CSV, parses it, and stores it in the global _REGISTRY by name.
    def register(manifest_path: str, name: str | None = None) -> JsSource:
        p = os.path.abspath(os.path.expanduser(manifest_path))
        if not os.path.isfile(p):
            raise FileNotFoundError(p)
        if name is None:
            name = os.path.basename(os.path.dirname(p)) or "js"
        src = JsSource(name=name, manifest_path=p, records=parse_manifest(p))
        _REGISTRY[name] = src
        return src
Behavior2/5

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

No annotations provided, so description must carry full burden. It discloses basic behavior (list, filter) but omits details like read-only nature, authentication needs, or what 'source' means. The description adds little beyond the name.

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?

Single sentence, front-loaded with key action. Concise but sacrifices necessary detail.

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 three parameters and no annotations, the description is insufficient. It does not explain 'name' or 'limit', nor differentiate from sibling list tools. An output schema exists, so return values are covered, but input semantics are lacking.

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

Parameters2/5

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

Schema description coverage is 0%; description only hints at host_filter purpose. The required parameter 'name' and optional 'limit' are not explained at all, leaving the agent to infer meaning.

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 tool lists JS files in a source with optional host regex filtering. However, it does not distinguish from sibling tool 'js_list', which could be similar.

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?

No guidance on when to use this tool vs alternatives (e.g., js_list, js_search). No exclusions or prerequisites mentioned.

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/titaniumtushar/burp-mcp-plus'

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