Skip to content

Added show_markdown and show_markdown_file MCP tools - #116

Merged
oleg68 merged 2 commits into
nbplugins:mainfrom
oleg68:feature/show-markdown-mcp-tools
May 14, 2026
Merged

oleg68 merged 2 commits into
nbplugins:mainfrom
oleg68:feature/show-markdown-mcp-tools

Conversation

@oleg68

@oleg68 oleg68 commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Added show_markdown MCP tool: renders markdown text directly in a NetBeans Markdown Preview tab (deduplicates tabs by title, updates in-place on repeated calls)
  • Added show_markdown_file MCP tool: opens a live-updating preview tab tied to a .md file on disk — the tab auto-refreshes when the file changes
  • Both tools are automatically added to permissions.allow in settings.local.json when a session starts, and removed on session stop

Test plan

  • Install NBM, start a Claude session (not in plan mode)
  • Ask Claude: Use show_markdown tool with markdown="# Hello\n\nTest" and title="Test" → Markdown Preview tab opens with rendered content
  • Ask again with the same title → existing tab updates, no duplicate
  • Ask Claude: Use show_markdown_file tool with filePath="~/.claude/plans/<any>.md" → live preview opens, updates when file is edited
  • Stop the session, check settings.local.json has no mcp__netbeans__show_markdown* entries

🤖 Generated with Claude Code

Oleg Samarin and others added 2 commits May 14, 2026 10:16
Two new MCP tools let Claude push content into a NetBeans Markdown
Preview tab:
- show_markdown(markdown, title?) — renders markdown text directly
- show_markdown_file(filePath, title?) — opens a live-updating preview
  tied to a file on disk; the tab auto-refreshes on file changes

Both tools are auto-allowed via permissions.allow in settings.local.json
when a session starts, and cleaned up on session stop.

Includes a Python POC test (claude-launch-tests/test_show_markdown_poc.py)
that verified Claude Code calls the tool correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After removing our tools from permissions.allow, the cleanup also
removes the empty deny:[] array we added during merge, then removes
the entire permissions key if it becomes empty.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oleg68
oleg68 merged commit ab8ee06 into nbplugins:main May 14, 2026
3 checks passed
@oleg68
oleg68 deleted the feature/show-markdown-mcp-tools branch May 14, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant