Skip to content

sample_sequences rejects MCP tool names with underscores #46

Open

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions