Skip to main content
Glama

analyze

Inspect SQL or PySpark code for context, data flow, and optimization opportunities, from snippets to full workspace analysis.

Instructions

Deprecated. Prefer convert / glue_job / review. Still registered this minor version.

Analyze SQL or PySpark code for context, data flow, or optimization opportunities.

Modes:

sql_context Analyze SQL context (schemas, tables, dialect, complexity). Parameters: sql_content or selected_text

data_flow Analyze data flow patterns in PySpark code. Parameters: pyspark_code (required), table_info

codebase Analyze a PySpark codebase directory for patterns and issues. Parameters: directory_path (required), include_optimization_suggestions, scan_depth

workspace Full workspace analysis including project structure. Parameters: sql_content or workspace_path, include_project_structure, workspace_name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
scan_depthNo
table_infoNo
sql_contentNo
pyspark_codeNo
selected_textNo
directory_pathNo
workspace_nameNo
workspace_pathNo
include_project_structureNo
include_optimization_suggestionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.0.4

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral disclosure burden: it clearly marks the tool as deprecated and describes what each mode analyzes. It does not disclose operational constraints or response behavior, though the output schema exists and the analysis-focused verbs imply read-only 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 well-structured with bold headings and compact mode blocks; the deprecation warning is front-loaded and every listed parameter relates to a specific mode. There is no filler or redundant restatement of the schema.

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?

For a mode-based tool with 11 parameters and no annotation coverage, the description provides enough per-mode detail to invoke it correctly, and the output schema covers the return shape. It could be more complete by explaining optional parameter meanings and the relationship to preferred replacement tools, but the core calling contract is present.

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?

Schema description coverage is 0%, so the description compensates by mapping every mode to its relevant parameters and marking required ones, such as pyspark_code for data_flow and directory_path for codebase. It stops short of defining the semantics of scan_depth, table_info, or workspace_name, but the mode-to-parameter mapping is the most critical missing guidance.

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 analyzes SQL or PySpark code and enumerates four distinct modes: sql_context, data_flow, codebase, and workspace. However, it does not meaningfully differentiate analyze from its preferred siblings beyond a bare deprecation pointer, so it stops short of 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 deprecation notice advises preferring convert/glue_job/review, and each mode lists its parameters, giving a rough sense of when a mode applies. There is no explicit when-to-use versus when-not-to-use guidance or conditions for choosing analyze over the preferred replacement tools.

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

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/AnnasMazhar/pyspark_mcp'

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