Skip to main content
Glama

tool_diagnose_editor

Diagnose CSDN markdown editor UI drift and broken selectors: probe title, content, save, publish, and tag elements to report matched fallbacks when publish fails.

Instructions

Diagnose the CSDN markdown editor to detect UI drift / broken selectors.

Opens the CSDN editor with your saved session and probes every key element (title display/input, content editor, save-draft button/item, publish button, tag/category inputs, dialog publish button). For each selector it reports which fallback matched (or none), so when publish_csdn starts failing you can run this to see exactly which selectors CSDN changed and update SELECTORS in publisher.py accordingly.

Requires a saved session — call csdn_login first.

Args: headless: Run headless (default True). Set False to watch. timeout_ms: Per-action timeout in milliseconds.

Returns: dict with {ok, url, results: {element: matched_selector | null}, needs_login?, message?}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headlessNo
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full disclosure burden, and it does well: it says the editor is opened with the saved session, that every key element is probed, that per-selector fallback matches are reported, and that a needs_login state is possible. The one gap is that it never explicitly states this is a non-mutating diagnostic that will not publish or alter drafts, which an agent might otherwise worry about.

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?

Purpose is front-loaded in the first line, followed by mechanism, prerequisite, and Args/Returns sections. The structure is clean and scannable; the element enumeration is slightly long but directly supports the tool's diagnostic purpose, so little is wasted.

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 no output schema, the description supplies the return contract itself ({ok, url, results: {element: matched_selector | null}, needs_login?, message?}), plus the prerequisite and parameter behavior. An agent has everything needed to call it and interpret the result.

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?

Schema description coverage is 0%, so the description must compensate, and it does: both parameters are documented with meaning beyond the schema, including the default and the behavioral effect of headless=False ('Set False to watch') and that timeout_ms is a per-action timeout. Minor detail like the timeout's failure behavior is left unstated.

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?

States a specific verb (Diagnose) and resource (CSDN markdown editor) plus the exact failure mode it detects (UI drift / broken selectors), and enumerates the elements it probes. It also differentiates itself from the sibling publish_csdn by positioning itself as the recovery path when that tool fails.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the trigger condition ('when publish_csdn starts failing you can run this') and the intended follow-up action (update SELECTORS in publisher.py). It also states a hard prerequisite: a saved session, with a pointer to call csdn_login first.

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