Skip to content

feat(time): add time_ prefix to tool names for consistency#3274

Open
Sean-Kenneth-Doherty wants to merge 1 commit intomodelcontextprotocol:mainfrom
Sean-Kenneth-Doherty:feat/time-tool-prefix
Open

feat(time): add time_ prefix to tool names for consistency#3274
Sean-Kenneth-Doherty wants to merge 1 commit intomodelcontextprotocol:mainfrom
Sean-Kenneth-Doherty:feat/time-tool-prefix

Conversation

@Sean-Kenneth-Doherty
Copy link
Copy Markdown

Summary

Adds a time_ prefix to the Time MCP server tool names for consistency with other MCP servers:

  • get_current_timetime_get_current
  • convert_timetime_convert

Motivation

This follows the naming convention used by other MCP servers (e.g., git_status, git_commit, git_diff) and makes it easier to identify related tools when multiple MCP servers are registered with a client.

As noted in issue #3201, users integrating multiple MCP servers see tool names like:

  • MCP_DOCKER_convert_time
  • MCP_DOCKER_get_current_time

With this change, the tools become:

  • MCP_DOCKER_time_get_current
  • MCP_DOCKER_time_convert

This makes it immediately clear these tools belong to the Time server.

Changes

  • Updated tool name enum values in server.py
  • Updated README documentation and examples

Breaking Change Notice

⚠️ This is a breaking change for existing users of the Time MCP server. Any automation or configuration referencing the old tool names (get_current_time, convert_time) will need to be updated.

Closes #3201

Adds 'time_' prefix to the Time MCP server tool names:
- get_current_time → time_get_current
- convert_time → time_convert

This follows the naming convention used by other MCP servers (e.g., git_status,
git_commit) and makes it easier to identify related tools when multiple MCP
servers are registered.

Closes modelcontextprotocol#3201
@cliffhall cliffhall added enhancement New feature or request server-time Reference implementation for the Time MCP server - src/time labels Apr 20, 2026
@cliffhall
Copy link
Copy Markdown
Member

@claude review

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 21, 2026

Claude finished @cliffhall's task in 2m 9s —— View job


PR Review: feat(time): add time_ prefix to tool names for consistency

  • Gather context and read changed files
  • Examine naming conventions across other servers
  • Analyze the changes and provide review feedback

Summary

The implementation is technically correct and the motivation is reasonable, but there are significant concerns about naming convention consistency and the specific names chosen.


Naming Convention Analysis

The PR cites the git server's git_status / git_commit pattern as precedent, but the actual naming conventions across this repo are not uniform:

Server Naming Pattern Examples
git (Python) <server>_<verb> prefix git_status, git_diff, git_commit, git_log
fetch (Python) No prefix, single tool fetch
filesystem (TypeScript) No prefix, verb-first read_file, write_file, create_directory, get_file_info
memory (TypeScript) No prefix, verb-first create_entities, search_nodes, read_graph
time (this PR) time_ prefix time_get_current, time_convert

The git server is the only server in this repo with a server-name prefix. The other three multi-tool servers (filesystem, memory) use unprefixed, verb-first names. This PR would make the time server follow the git server pattern while the rest of the repo stays with the verb-first convention.


Concerns

1. Name loses descriptive clarity (src/time/src/mcp_server_time/server.py:18)

The original name get_current_time is a complete English phrase — it clearly tells the user what is being retrieved. The new name time_get_current drops "time" as the object: get current what? Compare with git_status (a complete concept) vs time_get_current (which requires the prefix to complete the meaning). get_current_timetime_get_current is semantically weaker.

If following the git pattern strictly, time_get_current_time would be the lossless equivalent, but that's redundant. This suggests the <server>_<verb> pattern is a better fit for git's atomic operations (status, diff, commit) than for the time server's more descriptive operations.

2. Inconsistency with the rest of the repo

The filesystem and memory servers — both officially maintained in this repo — do not use server-name prefixes. Merging this would make the time server diverge from those conventions without a broader effort to standardize across all servers. The PR references issue #3201 but that issue doesn't appear to establish an official policy.

3. Breaking change cost vs. benefit

This is a breaking change for all existing users, integrations, and configurations referencing get_current_time and convert_time. The benefit (easier disambiguation in multi-server setups) is real but the disambiguation problem is already partially handled by how MCP clients present tools (e.g., with a server name namespace). This is a high cost for a quality-of-life improvement.


What's Correct

  • The actual code changes are minimal and technically correct — only server.py:18-19 (enum values) and the README are updated.
  • The README examples are updated consistently to match the new names.
  • The PR is honest about the breaking change.

Minor Pre-existing Issues (Not Introduced by This PR)

  • README.md:213-217 — the get_current_time response example omits the day_of_week field that TimeResult actually returns.
  • README.md:244 — the convert example has a trailing comma in the JSON response block (invalid JSON).

Recommendation

Request changes. The motivation (disambiguation in multi-server setups) is valid, but before merging:

  1. Either establish a repo-wide decision to prefix all server tool names consistently (updating filesystem and memory servers too), or keep the time server consistent with those servers by not adding a prefix.
  2. If the time_ prefix is kept, consider time_get_current_time → too redundant — or a restructured name like time_now and time_convert that don't drop the subject. time_convert is actually fine; time_get_current is the weak name.

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

Labels

enhancement New feature or request server-time Reference implementation for the Time MCP server - src/time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Unify the names of the Time MCP server tools

2 participants