Skip to content

Unify EvEMTBench MCP tools and address PowerFactory follow-ups - #122

Merged
qian-harvard merged 5 commits into
Power-Agent:mainfrom
aswinkrishnapoyil:fix/powerfactory-export-bootstrap-followups
Oct 22, 2026
Merged

qian-harvard merged 5 commits into
Power-Agent:mainfrom
aswinkrishnapoyil:fix/powerfactory-export-bootstrap-followups

Conversation

@aswinkrishnapoyil

@aswinkrishnapoyil aswinkrishnapoyil commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Consolidates the EvEMTBench MCP interface and addresses the two follow-up remarks from PR #113.

Unified equipment interface

Only two EvEMTBench tools are exposed:

  • list_evemtbench_components(component_type, filters)
  • create_evemtbench_component(component_type, parameters)

The listing tool supports transformers, overhead lines, underground cables, external grids, loads and synchronous machines. Responses include catalog data, mapping limitations, supported filters, and creation-parameter names, types, required flags and defaults.

Specialized implementations remain internal. Their separate MCP wrappers are removed, and documentation includes migration examples.

This intentionally changes the MCP interface. Existing specialized calls must migrate to the unified tools, and clients must refresh their tool list.

Maintainer follow-ups

  • Preserves the PDF export outcome when diagram restoration fails, appending a warning without hiding the original export error.
  • Binds grid-bootstrap confirmation to the resolved destination folder and required folder-creation decisions.

Validation

  • 166 tests and 85 subtests passed.
  • Local wheel build and all six installed unified catalog listings passed.
  • MCP client reported only the two unified EvEMTBench tools.
  • MCP-client checks passed for all six catalog types, including filters and creation-parameter discovery.
  • Evidence recorded in FT-27.
  • git diff --check passed.

Confirmed equipment creation was not rerun for this update. The new bootstrap-destination and PDF warning cases have automated coverage only.

@aswinkrishnapoyil aswinkrishnapoyil changed the title Preserve PDF export results and bind bootstrap destination Unify EvEMTBench MCP tools and address PowerFactory follow-ups Oct 15, 2026

@qian-harvard qian-harvard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this works well. Merged on top of main:

  • PowerFactory/tests: 166 passed, 85 subtests passed.
  • Other CI suites: 503 passed.
  • The wheel ships all six catalogs and every unified listing works.
  • The server exposes only list_evemtbench_components and create_evemtbench_component for EvEMTBench.
  • Each removed create/list tool's signature matches the unified creation_parameters/filters exactly, so nothing that was creatable before has become unreachable.
  • Both #113 follow-ups are correct: the PDF export keeps its own outcome when the restore fails, and the grid-bootstrap token is bound to the destination plan.

Small follow-ups, none blocking:

  1. create_evemtbench_component takes an untyped parameters dict, and the creators read out_of_service/open_digsilent with bool(...) (e.g. evemtbench.py:1619, 1866). So "out_of_service": "false" becomes True. The preview token shows out_of_service=1 before confirmation, which limits the damage, but an isinstance(..., bool) check like the existing seed check would reject it outright.
  2. references/tool_guide.md:723 still says "the public MCP tool names and arguments are unchanged". That sentence came from the old README and contradicts this PR.
  3. references/tool_guide.md isn't in the wheel's force-include list, so the README links to it don't resolve in an installed package. references/evemtbench.md has the same gap. The links work on GitHub.

The tool consolidation is a breaking change for MCP clients, so we'll call it out in the next release notes.

@qian-harvard
qian-harvard merged commit 9179b4b into Power-Agent:main Oct 22, 2026
5 checks passed
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.

2 participants