Skip to main content
Glama

Analyze JavaScript/TypeScript

analyze_javascript
Read-onlyIdempotent

Scans JavaScript/TypeScript files or projects to inventory frameworks, npm dependencies, routes, components, browser APIs, and migration risks for Java migration planning.

Instructions

Inventory a JS/TS file or project: frameworks, npm dependencies, routes, components, browser APIs and migration risks.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "analyze_javascript"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoInline source to analyze instead of reading a path
pathNoJavaScript/TypeScript file or project directory inside an allowed root
file_nameNoVirtual file name for inline code, e.g. app.tsx (default input.js)
max_filesNoMaximum project files to scan (default 500)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered by structured data. The description adds the inventory dimensions that will be reported, which is genuine value, but it says nothing about how inline `code` interacts with `path`, whether both can be supplied, or what happens on unsupported roots.

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 with the verb first and the reported dimensions listed compactly. No filler, though "migration risks" is left unexplained and is the one item that would benefit from a clarifying clause.

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

Completeness4/5

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

With no output schema, the description carries the burden of describing return content, and the enumerated dimensions give an agent a usable picture of what comes back. It is adequate for a read-only analysis tool, losing only the finer points about output shape and multi-source handling.

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 description coverage is 100%, so all four parameters are already documented, including defaults for file_name and max_files. The description adds no meaning beyond the schema for any of them; 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?

Names a specific verb ("Inventory") plus the exact resource ("a JS/TS file or project") and enumerates what is reported: frameworks, npm dependencies, routes, components, browser APIs, migration risks. That makes it clearly distinguishable from generic siblings like analyze_code or analyze_springboot_project. It stops short of explicitly naming a sibling alternative, so it is not a 5.

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

Usage Guidelines3/5

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

The JS/TS scope implies when to use it, but there is no explicit when-to-use/when-not guidance and no mention of the obvious alternative (analyze_code) or of any prerequisites. An agent must infer the routing decision from the resource name alone.

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