Skip to content

MCP and LLM enhancement : add _spec/ endpoint to API#154

Open
nicdavidson wants to merge 5 commits intodevelopfrom
mcp-enhancement
Open

MCP and LLM enhancement : add _spec/ endpoint to API#154
nicdavidson wants to merge 5 commits intodevelopfrom
mcp-enhancement

Conversation

@nicdavidson
Copy link
Contributor

Adds x-dreamfactory-relationships and x-dreamfactory-resources to _spec endpoint for better LLM/agent discoverability

VladyslavTy and others added 5 commits December 4, 2025 15:32
Added standard overview describing DreamFactory as a secure, self-hosted
enterprise data access platform for enterprise apps and on-prem LLMs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ection

- Add ?model=true parameter returning condensed ~14KB data model with all
  tables, columns, types, foreign keys, row counts, and structural patterns
- Add detectRelationshipPatterns() to identify self-referencing hierarchies
  and junction tables for many-to-many relationships
- Preserve relationship metadata in compact mode (was being stripped)
- Add handleModelResponse() and buildDataModel() for LLM-optimized output
- Add spec_url to service listing in RestController for discoverability

Tested in Round 7 A/B: new model endpoint achieved 5/5 accuracy with
12 API calls vs 4.5/5 with 27 calls using old schema-per-table approach.
…ements

Extend _spec?model=true endpoint with:
- ?stock=true param to toggle enhanced metadata on/off (for A/B testing)
- Auto-generated query templates (count, group-by, top-N, paginate, join, date)
- Field semantic hints (amount, audit, hierarchy detection)
- Sample data and enum value detection (conditional on stock mode)
- Related record usage hints with relationship name guidance

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

4 participants