Skip to main content
Glama
Jasuni69

Microsoft Fabric MCP Server

by Jasuni69

generate_pyspark_code

Generate PySpark code for common data operations like reading, writing, transforming, joining, and aggregating lakehouse tables using operation, table, column, and filter inputs.

Instructions

Generate PySpark code for common operations.

Args:
    operation: Type of operation ('read_table', 'write_table', 'transform', 'join', 'aggregate')
    source_table: Source table name (format: lakehouse.table_name)
    target_table: Target table name (format: lakehouse.table_name)
    columns: Comma-separated list of columns
    filter_condition: Filter condition for data
    ctx: Context object containing client information
Returns:
    A string containing the generated PySpark code or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
columnsNo
operationYes
source_tableNo
target_tableNo
filter_conditionNo

Schema Changelog

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

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It does disclose the return type as a string of code or an error message, which adds some transparency. However, it does not explicitly state that code is only generated and not executed, nor does it mention preconditions or side effects.

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?

The description is well-structured with a front-loaded summary and clear Args/Returns sections. It is efficient overall, though the mention of the non-schema 'ctx' parameter adds minor noise.

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

Completeness3/5

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

The description is reasonably complete for a simple code-generation tool, but it lacks operation-specific parameter requirements, examples, and details about error conditions. Since there is no output schema, more detail about what the generated code looks like would improve completeness.

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?

The description adds useful meaning beyond the schema by listing operation enum values, table name formats, and comma-separated columns. However, it omits which parameters are required for each operation type, which is essential for correct invocation, and it mentions a 'ctx' parameter that is not present in the input schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Generate PySpark code' and lists five concrete operation types. This clearly distinguishes it from siblings like validate_pyspark_code and generate_fabric_code by technology and output.

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?

There is no guidance on when to use this tool versus alternatives such as validate_pyspark_code, create_pyspark_notebook, or generate_fabric_code. The operation list implies a use case, but no explicit conditions or exclusions are provided.

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/Jasuni69/ms-core-mcp'

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