Skip to content

Commit c7262e1

Browse files
author
root
committed
add arg matmaster
1 parent 1ed09b1 commit c7262e1

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/abacusagent/main.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def load_tools(screen_modules: List[str] = []):
1313
module_dir = Path(__file__).parent / "modules"
1414

1515
for py_file in sorted(module_dir.glob("*.py")):
16-
if py_file.name.startswith("_") or py_file.stem in ["utils", "comm"] + screen_modules:
16+
if py_file.name.startswith("_") or py_file.stem in ["utils", "comm", "tool_wrapper"] + screen_modules:
1717
continue # skipt __init__.py and utils.py
1818

1919
module_name = f"abacusagent.modules.{py_file.stem}"
@@ -71,6 +71,11 @@ def parse_args():
7171
default=[],
7272
help="List of modules to screen for loading. If not specified, all modules will be loaded."
7373
)
74+
parser.add_argument(
75+
"--matmaster",
76+
action="store_true",
77+
help="Start the MCP server for MatMaster"
78+
)
7479

7580
args = parser.parse_args()
7681

@@ -118,7 +123,11 @@ def main():
118123
create_workpath()
119124

120125
from abacusagent.init_mcp import mcp
121-
load_tools(args.screen_modules)
126+
127+
if args.matmaster:
128+
from abacusagent.modules.tool_wrapper import run_abacus_calculation
129+
else:
130+
load_tools(args.screen_modules)
122131

123132
print_address()
124133
mcp.run(transport=os.environ["ABACUSAGENT_TRANSPORT"])

0 commit comments

Comments
 (0)