Skip to main content
Glama

generate_flink_job

Generate executable Apache Flink SQL from natural language and a schema, then run it on real Flink with sample data to return verified SQL and actual output or errors.

Instructions

Generate an Apache Flink SQL streaming job from a natural-language request and a schema, then RUN it on real Flink against sample data and return the verified SQL plus its actual output (or the Flink error). Use whenever the user wants a Flink streaming job (windowed aggregates, top-N, dedup, interval/temporal joins, filters) — it produces jobs that provably run, unlike hand-written SQL. Supply representative sample rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYesPlain-English job description.
sourcesYesSource tables. Each: name, columns [[name, flinkType], ...], event_time (column), watermark_delay_seconds, optional primary_key.
sample_dataYesMap of source name -> list of row objects. TIMESTAMP columns may be integer seconds (offset from a base) or a 'yyyy-MM-dd HH:mm:ss.SSS' string.
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals the critical behavior that the tool actually RUNS the job on real Flink (not just generates), and returns the actual output OR the Flink error. This goes beyond a simple schema and gives users an accurate expectation of execution and failure modes.

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 two sentences, front-loaded with the primary action, and every phrase adds critical information (generation, execution, return value, use cases, contrast with hand-written SQL, sample data instruction). No fluff or redundancy.

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?

Despite having no output schema, the description explicitly states what the tool returns (verified SQL + actual output or Flink error), covering the return contract. The complex nested schema is fully documented. It lacks only explicit prerequisites or permission requirements, but the description is complete for a code-generation-and-execution tool.

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?

The input schema already provides 100% coverage with descriptive parameter details. The description adds further value by emphasizing the need for 'representative sample rows' and clarifying the return contract (verified SQL + output/error). The combination of schema and description gives users complete parameter understanding.

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 explicitly states the tool's action: generate and RUN an Apache Flink SQL streaming job, returning verified SQL and output/errors. It clearly distinguishes from siblings (ground_kafka_topic, deploy_to_kafka) by focusing on job generation/execution rather than Kafka infrastructure.

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 provides explicit when-to-use guidance ('Use whenever the user wants a Flink streaming job') and even contrasts against hand-written SQL ('produces jobs that provably run, unlike hand-written SQL'). It also gives a practical instruction ('Supply representative sample rows'). It doesn't explicitly state exclusions or alternatives among siblings, but the context is clear enough.

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/clementlemon02/text2flink'

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