Skip to content

Commit 41821a3

Browse files
committed
move constants
1 parent fa24eb5 commit 41821a3

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/mcpcat/modules/constants.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@
44
EVENT_ID_PREFIX = "evt"
55
MCPCAT_API_URL = "https://api.mcpcat.io" # Default API URL for MCPCat events
66
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.\""
7+
8+
# Maximum number of exceptions to capture in a cause chain
9+
MAX_EXCEPTION_CHAIN_DEPTH = 10
10+
11+
# Maximum number of stack frames to capture per exception
12+
MAX_STACK_FRAMES = 50

src/mcpcat/modules/exceptions.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@
1010
from typing import Any
1111

1212
from mcpcat.types import ChainedErrorData, ErrorData, StackFrame
13-
14-
# Maximum number of exceptions to capture in a cause chain
15-
MAX_EXCEPTION_CHAIN_DEPTH = 10
16-
17-
# Maximum number of stack frames to capture per exception
18-
MAX_STACK_FRAMES = 50
13+
from mcpcat.modules.constants import MAX_EXCEPTION_CHAIN_DEPTH, MAX_STACK_FRAMES
1914

2015
_captured_error: contextvars.ContextVar[BaseException | None] = contextvars.ContextVar(
2116
"_captured_error", default=None

0 commit comments

Comments
 (0)