You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
Owl Builder
committed
Allow MCP dictionary searches to return Markdown
The search_dictionary MCP tool now accepts an optional format parameter. Omitting it preserves the existing JSON text output, while format=markdown converts each HTML definition through html-to-markdown and returns Markdown text content for clients that prefer readable dictionary output.
Constraint: Frontend copy behavior is intentionally unchanged for this iteration
Constraint: format must remain optional so existing MCP clients continue working
Rejected: Changing the default MCP output to Markdown | would break clients expecting the current JSON text content
Confidence: high
Scope-risk: moderate
Directive: Keep format handling backward-compatible; add new formats explicitly instead of changing the default
Tested: cd backend && go test ./...
Tested: cd backend && go vet ./...
Tested: git diff --check
@@ -35,6 +36,7 @@ type listDictionariesOutput struct {
35
36
typesearchDictionaryInputstruct {
36
37
DictionaryID*int`json:"dictionary_id,omitempty" jsonschema:"Optional dictionary id returned by list_dictionaries. If omitted, all accessible dictionaries are searched."`
37
38
DictionaryName*string`json:"dictionary_name,omitempty" jsonschema:"Optional dictionary name or title returned by list_dictionaries. Used when dictionary_id is omitted."`
39
+
Format*string`json:"format,omitempty" jsonschema:"Optional text output format. Use markdown to return Markdown text content; omit to keep the default JSON text output."`
38
40
Querystring`json:"query" jsonschema:"Word, phrase, or headword to look up."`
0 commit comments