Skip to main content
Glama

verify_flet_code

Read-only

Verifies Flet code by combining static analysis and sandboxed execution to catch invalid controls, property typos, and runtime errors before delivery.

Instructions

Verify Flet code against the INSTALLED flet — ALWAYS call this before delivering Flet code to the user. Two passes: (1) static analysis for unknown controls, invalid constructor properties, enum typos, deprecated usage and undefined event handlers, each with line numbers and hints; (2) sandboxed execution that constructs the controls (app launchers are neutralized, nothing opens) and fires flet's own validators, catching errors that only appear at runtime (e.g. Slider(min > max)). Fix every diagnostic and re-verify until status == 'passed'.

Args: code: Complete, runnable Flet app code (a main(page) function plus ft.app(main) is ideal — main is invoked against a mock page). timeout_secs: Execution timeout for the sandbox (default 15, max 60).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
timeout_secsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
checksYes
statusYes
diagnosticsYes
duration_msYes
flet_versionYes
controls_verifiedYes
Install Server

TDQS

A4.8/5.0
Behavior5/5

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

The description details the sandbox ('app launchers are neutralized, nothing opens') and the two passes, including runtime-only error examples. This meaningfully supplements the sparse readOnlyHint/destructiveHint annotations, and nothing contradicts them.

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 main paragraph front-loads the trigger condition and then organizes the mechanics as two numbered passes; Args are bulleted. Despite covering a nuanced tool, no sentence is filler.

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

Completeness5/5

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

With only two parameters and an output schema present, the description covers the necessary invocation pattern, default timeout, and success criterion ('status == passed'). The sandboxing detail is especially important for an agent deciding whether it is safe to run arbitrary code.

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

Parameters5/5

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

Schema coverage is 0%, and the description compensates by defining 'code' as complete runnable Flet app with an ideal main(page)+ft.app(main) shape and explaining how main is invoked against a mock page. It also gives timeout_secs default and max, so an agent can choose sensible values.

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?

Opens with a concrete verb and target: 'Verify Flet code against the INSTALLED flet.' Names the two-pass verification mechanism, making it unambiguous among sibling search/inspection tools. The 'ALWAYS call' phrasing reinforces its specialized role.

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?

Explicitly states the main use condition: 'ALWAYS call this before delivering Flet code to the user.' It goes on to instruct the agent to fix diagnostics and re-verify until passed, which is clear operational guidance. It does not mention alternatives or exclusions, but the directive is strong and sufficient.

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

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/Nwokike/flet-mcp-server'

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