Skip to content

Commit 2769ea0

Browse files
Add optional entry_point parameter
1 parent 86d29c9 commit 2769ea0

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/mcp_diffblue_server.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ def __init__(self):
2525
"working_directory": {
2626
"type": "string",
2727
"description": "Working directory for running dcover create (optional)"
28+
},
29+
"entry_point": {
30+
"type": "string",
31+
"description": "Fully qualified class name to test (optional)"
2832
}
2933
}
3034
}
@@ -83,7 +87,10 @@ def handle_tools_call(self, request: Dict[str, Any]) -> Dict[str, Any]:
8387
}
8488

8589
if tool_name == "dcover_create":
86-
result = self.run_dcover_create(tool_args.get("working_directory"))
90+
result = self.run_dcover_create(
91+
tool_args.get("working_directory"),
92+
tool_args.get("entry_point")
93+
)
8794
return {
8895
"jsonrpc": "2.0",
8996
"id": request.get("id"),
@@ -97,14 +104,18 @@ def handle_tools_call(self, request: Dict[str, Any]) -> Dict[str, Any]:
97104
}
98105
}
99106

100-
def run_dcover_create(self, working_dir: str = None) -> Dict[str, Any]:
107+
def run_dcover_create(self, working_dir: str = None, entry_point: str = None) -> Dict[str, Any]:
101108
"""
102109
Executes 'dcover create' in the specified working directory.
103110
"""
104111
if not working_dir:
105112
working_dir = os.getcwd()
106113

107114
command = ["dcover", "create"]
115+
116+
# Add entry point if provided
117+
if entry_point:
118+
command.append(entry_point)
108119

109120
try:
110121
result = subprocess.run(
@@ -210,4 +221,4 @@ def main():
210221

211222

212223
if __name__ == "__main__":
213-
main()
224+
main()

0 commit comments

Comments
 (0)