Skip to content

Conversation

@naji247
Copy link
Member

@naji247 naji247 commented Nov 6, 2025

Summary

  • Enhanced the default context description to provide more detailed and prescriptive guidance for LLMs
  • Refactored tests to use the constant instead of hard-coded strings for better maintainability

Changes

  • Updated DEFAULT_CONTEXT_DESCRIPTION in src/mcpcat/modules/constants.py with comprehensive guidelines including:
    • Clear explanation of the parameter's purpose (analytics and user intent tracking)
    • Specific word count requirement (15-25 words)
    • Mandatory third-person perspective (prohibits first-person pronouns)
    • Explicit prohibition of sensitive information
    • Concrete example demonstrating proper usage
  • Updated all test files to reference the constant instead of hard-coding the description string

Benefits

  1. Better LLM compliance: More prescriptive instructions help LLMs provide higher quality context
  2. Improved analytics: Word count requirements ensure sufficient detail for meaningful tracking
  3. Enhanced security: Explicit prohibition of sensitive data reduces risk
  4. Better maintainability: Centralized constant makes future updates easier

Test Plan

  • All existing tests pass with the updated constant
  • Tests verify that the new description is properly applied across different scenarios

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.

@naji247 naji247 merged commit b3dc17e into main Nov 6, 2025
30 checks passed
@naji247 naji247 deleted the feat/improve-context branch November 6, 2025 16:52
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.

3 participants