Skip to content

MCP tool: workspace_list — list workspace components with filters #118

Description

@TomProkop

Summary

New MCP tool for exploring workspace components. Loads solution projects via platform-metadata XmlWorkspaceReader and returns filtered component lists.

API

workspace_list

Params:
  path:    string?  — path to solution project / Declarations dir (default: cwd)
  type:    string?  — filter: Entity, Form, View, SecurityRole, AppModule, ...
  search:  string?  — substring match on name/logical name (case-insensitive)

Returns:
  solutions:  [{uniqueName, isManaged}]
  components: [{type, id, name, entityLogicalName?, formType?, source?}]
  summary:    {entities: N, forms: N, views: N, ...}

Example usage

workspace_list(type=Form, search=vat)
→ all forms with "vat" in entity name or display name

workspace_list(type=Entity)
→ all entities across all solution projects

workspace_list(type=Form, search=ntg_salesinvoiceheader)
→ all forms for a specific entity

Implementation notes

  • Auto-discover solution projects in monorepo (find all Declarations/Other/Solution.xml)
  • Load each via XmlWorkspaceReader.Load(), collect components
  • No session cache — stateless per call (~600ms load is acceptable)
  • Output: structured JSON for MCP, human-readable for CLI

Benchmark context

Tested on PCT20004 (35 solutions, 2126 components, 273 forms):

  • Load: ~600ms
  • Query: ~4ms
  • Finding all VAT-related forms: 55 forms on 22 entities in <700ms

No dependencies in platform-metadata

Uses existing read-only API (XmlWorkspaceReader, Workspace.Forms, MergeableNode.GetAttribute). No new platform-metadata features needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions