Skip to content

Commit 5b0e05a

Browse files
feat: Add scope parameter to test-my-tools prompt
Co-Authored-By: AJ Steers <[email protected]>
1 parent 842f1d2 commit 5b0e05a

File tree

1 file changed

+18
-2
lines changed
  • connector_builder_mcp/build_strategies/declarative_yaml_v1

1 file changed

+18
-2
lines changed

connector_builder_mcp/build_strategies/declarative_yaml_v1/prompts.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,32 @@ def add_stream_to_connector(
117117
description="Test all available MCP tools to confirm they are working properly",
118118
domain=ToolDomain.PROMPTS,
119119
)
120-
def test_my_tools_prompt() -> list[dict[str, str]]:
120+
def test_my_tools_prompt(
121+
scope: Annotated[
122+
str | None,
123+
Field(
124+
description=(
125+
"Optional free-form text to focus or constrain testing. "
126+
"This can be a single word, a sentence, or a paragraph "
127+
"describing the desired scope or constraints."
128+
),
129+
),
130+
] = None,
131+
) -> list[dict[str, str]]:
121132
"""Generate a prompt that instructs the agent to test all available tools.
122133
123134
Returns:
124135
List containing a single message dict with the guidance text
125136
"""
137+
content = TEST_MY_TOOLS_GUIDANCE
138+
139+
if scope:
140+
content = f"{content}\n\n---\n\nAdditional scope or constraints:\n{scope}"
141+
126142
return [
127143
{
128144
"role": "user",
129-
"content": TEST_MY_TOOLS_GUIDANCE,
145+
"content": content,
130146
}
131147
]
132148

0 commit comments

Comments
 (0)