Skip to main content
Glama

get_focused_widget

Identify which Tkinter widget currently has focus. Returns the widget's ID as JSON, or null if no widget is focused.

Instructions

Get the currently focused widget.

Returns: JSON with the focused widget's ID or null if no widget has focus

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations exist, so description must stand alone. It states the return value (JSON ID or null) but does not explicitly state it is read-only and side-effect-free. Minimal but adequate.

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?

Two simple sentences: a clear purpose and a noted return format. No wasted words, information is efficiently front-loaded.

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 zero-parameter getter with output schema, the description covers purpose and return format. Could mention that it returns null if no focus, which it does. Lacks sibling differentiation but not critical.

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?

No parameters exist, and schema coverage is 100% (trivially). Description adds nothing beyond schema, which is acceptable since no parameters need documentation.

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?

Clearly states 'Get the currently focused widget', specifying the exact resource and action. Distinct from siblings like focus_widget (which sets focus) and get_widget_value (which queries a specific widget's value).

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?

No explicit guidance on when to use this tool vs alternatives. Usage is implied for querying the current focus, but no exclusions or prerequisites are given.

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/tctibbs/tkinter-mcp-server'

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