Skip to content

feat: richer MCP tool surface — get_full_entity + progressive disclosure for agents #75

Description

@rajnavakoti

Description

Today the MCP server gives an agent essentially one mode: semantic retrieval that returns fused/partial context (score-weighted body fragments). That traps the agent in a single fuzzy mode and can't serve two common needs:

  1. Aggregate/structured questions — e.g. "how many software systems are in this domain?" Semantic retrieval returns top-k similar chunks, not a complete count. (Covered by feat: query mode — let agents issue structured queries against the block ontology via MCP #74 query mode — cross-linked.)
  2. Progressive disclosure / drill-down — the agent gets a partial snapshot, realizes it's relevant, and needs the complete entity. There's no way to say "give me the full entity."

The fix is an agent-native toolset the agent composes: discover fuzzy → drill to full entity → query for exact/aggregate. Fits the "primitives, not workflow" scope — hand the agent a toolbox, it decides.

The toolset

Tool Purpose Status
ask / retrieve fuzzy discovery — find candidate entities exists
get_full_entity(id) return the complete entity (frontmatter + full body + relationships), not a fused snippet this issue
list_entities(type) / count enumerate/aggregate by type ("how many systems") overlaps #74
get_related(id, relationship) traverse the typed graph from an entity this issue (optional)

Why (ties to architecture)

  • Answers the exact/structured question class without an RDF/OWL back-end — the in-memory typed graph already knows entity types and relationships. See the "why not RDF/OWL" decision.
  • Progressive disclosure means retrieval can stay lean (fused snapshots for discovery) while the agent pulls full detail only when it needs it — cheaper context, agent-controlled depth.

Acceptance Criteria

  • MCP tool get_full_entity(id) returns the complete entity (frontmatter + full markdown body + resolved relationships)
  • MCP tool list_entities(type?) returns entities (optionally filtered by type), enabling counts/enumeration
  • (Optional) get_related(id, relationship?) returns entities connected to a given entity
  • Tools are discoverable/described so an agent knows when to drill down vs. retrieve
  • Tests for each tool + a discover→drill→query flow

Out of Scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    frameworkScientific frameworks

    Type

    No type

    Fields

    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