Skip to content

sample_sequences rejects MCP tool names with underscores #46

Description

@evansenter

Problem

sample_sequences() rejects MCP tool names because they contain double underscores:

sample_sequences("mcp__event-bus__notify → mcp__event-bus__publish_event")
→ Error: "Invalid tool name: 'mcp__event-bus__notify' (must be alphanumeric)"

Impact

Cannot analyze workflow patterns involving MCP tools, which are increasingly common:

  • mcp__event-bus__* - 527 publish_event, 190 notify calls
  • mcp__github__* - significant usage
  • mcp__session-analytics__* - meta-analysis blocked

Proposed Fix

Update the tool name validation regex in sample_sequences() to allow underscores:

# Current (too restrictive)
r'^[a-zA-Z0-9]+$'

# Proposed
r'^[a-zA-Z0-9_]+$'

Or better: match the actual tool names as stored in the database.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:lowNice to have, backlog

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions