Skip to content

fix(mcp): drop .value on string episode_type in display code#4

Open
jonesmabea wants to merge 1 commit intosandst1:mainfrom
jonesmabea:fix/mcp-episode-type-string
Open

fix(mcp): drop .value on string episode_type in display code#4
jonesmabea wants to merge 1 commit intosandst1:mainfrom
jonesmabea:fix/mcp-episode-type-string

Conversation

@jonesmabea
Copy link
Copy Markdown

Bug

The remember and update_episode MCP tools crash when episode_type is passed as a parameter.

Error: 'str' object has no attribute 'value'

Reproduction: Call remember via MCP with episode_type="fact" (or any valid type).

Root Cause

MCP tool parameters always arrive as plain strings (e.g. "fact"), not EpisodeType enums. The display code in tool_remember() and tool_update_episode() calls ep_type.value, which fails on strings.

Fix

Remove .value from the two display lines. The string is already the enum's value ("fact" == EpisodeType.FACT.value), so output is identical.

Before: lines.append(f" Type: {ep_type.value}")
After: lines.append(f" Type: {ep_type}")

Affected Lines

  • remind/mcp_server.pytool_remember() display code
  • remind/mcp_server.pytool_update_episode() display code

MCP tool parameters arrive as plain strings, not EpisodeType enums.
The display code in tool_remember() and tool_update_episode() called
.value on ep_type, which crashes with "'str' object has no attribute
'value'" when episode_type is passed to the remember or update_episode
MCP tools.

Fix: remove .value — the string is already the enum's value
(e.g. "fact" == EpisodeType.FACT.value).
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