Skip to content

mcp --restricted: describe_model omits sources defined in imported files #263

Description

@LukV

Setup: @malloydata/cli 0.0.57, a published model (##(mcp-description) marker) that imports two sibling files — conformed dimension sources in one, a generated star in the other. Queries against imported sources work fine through the restricted run/compile tools.

Observed: describe_model returns only the sources defined in the entry file (13 of our 20). The imported sources — reachable, queryable, fenced — are absent from the described surface, so an agent working from describe_model cannot discover most of the model it is allowed to query.

Expected: the described surface matches the queryable surface — sources from imported files included (perhaps behind an option if the filter is intentional for some use case).

Likely spot: the source assembly filters explores by location against the root URI (for (const f of t.explores) MBe(f.location, rootUri) && … in the dist) while t.explores already carries the full model.

Workaround we ship meanwhile: a small script over @malloydata/malloy's model API (model.explores + getTaglines()), which sees everything — happy to retire it when describe walks imports. Thanks for the restricted mode — the typed problems[] and the no-escape fence are exactly right for LLM callers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions