Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mcpcat"
version = "0.1.10"
version = "0.1.11"
description = "Analytics Tool for MCP Servers - provides insights into MCP tool usage patterns"
authors = [
{ name = "MCPCat", email = "support@mcpcat.io" },
Expand Down
2 changes: 1 addition & 1 deletion src/mcpcat/modules/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
SESSION_ID_PREFIX = "ses"
EVENT_ID_PREFIX = "evt"
MCPCAT_API_URL = "https://api.mcpcat.io" # Default API URL for MCPCat events
DEFAULT_CONTEXT_DESCRIPTION = "Describe why you are calling this tool and how it fits into your overall task"
DEFAULT_CONTEXT_DESCRIPTION = "Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): \"Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization.\""
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammatical error in the instruction: "you" is classified as first person, but "you" is actually second person. First person pronouns are "I" and "we", while "you" is second person. This misclassification could confuse LLMs about the actual requirement.

The instruction currently states:

NEVER use first person ('I', 'we', 'you') - maintain third-person perspective

It should be:

NEVER use first person ('I', 'we') or second person ('you') - maintain third-person perspective

This ensures grammatical accuracy and clearer guidance for LLMs.

Suggested change
DEFAULT_CONTEXT_DESCRIPTION = "Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): \"Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization.\""
DEFAULT_CONTEXT_DESCRIPTION = "Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we') or second person ('you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): \"Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization.\""

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

7 changes: 4 additions & 3 deletions tests/community/test_community_tool_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pytest

from mcpcat import MCPCatOptions, track
from mcpcat.modules.constants import DEFAULT_CONTEXT_DESCRIPTION

from ..test_utils.community_client import create_community_test_client
from ..test_utils.community_todo_server import (
Expand Down Expand Up @@ -46,7 +47,7 @@ async def test_context_parameter_injection_enabled(self):
assert context_schema["type"] == "string"
assert (
context_schema["description"]
== "Describe why you are calling this tool and how it fits into your overall task"
== DEFAULT_CONTEXT_DESCRIPTION
)

@pytest.mark.asyncio
Expand Down Expand Up @@ -276,7 +277,7 @@ def tool_with_context(context: str, data: str):
context_schema = tool.inputSchema["properties"]["context"]
assert (
context_schema.get("description")
== "Describe why you are calling this tool and how it fits into your overall task"
== DEFAULT_CONTEXT_DESCRIPTION
)

# Should still be in required
Expand Down Expand Up @@ -466,7 +467,7 @@ async def test_default_context_description(self):
# Check for default description
add_todo_tool = next(t for t in tools_result if t.name == "add_todo")
context_schema = add_todo_tool.inputSchema["properties"]["context"]
assert context_schema["description"] == "Describe why you are calling this tool and how it fits into your overall task"
assert context_schema["description"] == DEFAULT_CONTEXT_DESCRIPTION

@pytest.mark.asyncio
async def test_custom_context_description_with_multiple_tools(self):
Expand Down
7 changes: 4 additions & 3 deletions tests/test_tool_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from mcp.types import Tool

from mcpcat import MCPCatOptions, track
from mcpcat.modules.constants import DEFAULT_CONTEXT_DESCRIPTION

from .test_utils.client import create_test_client
from .test_utils.todo_server import create_todo_server
Expand Down Expand Up @@ -40,7 +41,7 @@ async def test_context_parameter_injection_enabled(self):
assert context_schema["type"] == "string"
assert (
context_schema["description"]
== "Describe why you are calling this tool and how it fits into your overall task"
== DEFAULT_CONTEXT_DESCRIPTION
)

@pytest.mark.asyncio
Expand Down Expand Up @@ -319,7 +320,7 @@ def tool_with_context(context: str, data: str):
desc = context_schema.get("description", "")
if (
desc
== "Describe why you are calling this tool and how it fits into your overall task"
== DEFAULT_CONTEXT_DESCRIPTION
):
# Our description was added - this means the implementation overwrote it
# This happens because the check is at the property level not parameter level
Expand Down Expand Up @@ -705,7 +706,7 @@ async def test_default_context_description(self):
# Check for default description
add_todo_tool = next(t for t in tools_result.tools if t.name == "add_todo")
context_schema = add_todo_tool.inputSchema["properties"]["context"]
assert context_schema["description"] == "Describe why you are calling this tool and how it fits into your overall task"
assert context_schema["description"] == DEFAULT_CONTEXT_DESCRIPTION

@pytest.mark.asyncio
async def test_custom_context_description_with_multiple_tools(self):
Expand Down