Skip to content

Decouple add_field tool from UpjackApp internals #13

@mgoldsborough

Description

@mgoldsborough

The add_field tool in server.py directly accesses app._entities (a private attribute) to look up the schema path for an entity type. This couples the MCP tool to the internal representation of UpjackApp.

What to do:

  • Add a public method to UpjackApp for retrieving entity definitions (e.g., get_entity_def(entity_type)) or expose the schema path specifically
  • Update _register_add_field_tool to use the public API instead of app._entities

Why:
If UpjackApp internals change (e.g., _entities gets restructured), add_field breaks silently. A public accessor makes the contract explicit.

Found during QA review of feat/schema-evolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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