Skip to main content
Glama

verify_flet_code

Read-only

Validates Flet code by combining static analysis with sandboxed execution to catch compile-time 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.run(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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.2

TDQS

A4.8/5.0
Behavior5/5

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

The description substantially exceeds the annotations by revealing sandboxed execution, neutralized launchers, mock page invocation, and the two-pass analysis strategy. It also states that runtime-only errors like Slider(min > max) are caught, giving the agent a clear safety and behavior model.

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 and front-loaded with the critical 'ALWAYS call this before delivering' instruction. The detailed two-pass breakdown and parameter explanations are long but each earns its place, given the tool's complexity and importance.

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?

For a verification tool with an output schema, the description covers prerequisites, execution behavior, safety guarantees, success criteria, and the required action loop. Nothing essential for invoking this tool correctly is missing.

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 description coverage is 0%, so the description fully compensates. It explains that code must be complete and runnable, recommends the main(page) plus ft.run(main) shape, and notes that main is invoked against a mock page. It also clarifies timeout_secs as a sandbox execution timeout with default 15 and max 60.

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 action and resource: 'Verify Flet code against the INSTALLED flet.' It clearly distinguishes itself from sibling inspection/documentation tools by focusing on end-to-end verification of user-delivered code, with a concrete workflow and success criterion.

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 gives an explicit trigger: 'ALWAYS call this before delivering Flet code to the user.' It also prescribes the follow-up action of fixing diagnostics and re-verifying. However, it does not explicitly discuss when not to use it or name alternative tools for narrower verification needs.

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