Feature: list-survey-programs and list-survey-components#141
Open
luke-keller-census wants to merge 2 commits intomainfrom
Open
Feature: list-survey-programs and list-survey-components#141luke-keller-census wants to merge 2 commits intomainfrom
luke-keller-census wants to merge 2 commits intomainfrom
Conversation
Coverage Report for ./mcp-db
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Coverage Report for ./mcp-server
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
This PR lays the database groundwork for new MCP discovery tools (list-survey-programs and list-survey-components) by adding SQL functions and new component metadata (frequency/frequency_notes), plus updating the shared programs/components CSV source.
Changes:
- Adds a migration that creates
list_survey_programs()andlist_survey_components(program_string)SQL functions and addscomponents.frequency/components.frequency_notes. - Adds a migration unit test validating SQL escaping, NULL handling, and migration call order.
- Updates
mcp-db/data/components-programs.csvto includeFREQUENCYandFREQUENCY_NOTESand refreshes the dataset list.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| mcp-db/migrations/1773071716018_create-programs-and-components-search-functions.ts | Adds component columns, backfill SQL generation from CSV, and the two new SQL functions. |
| mcp-db/tests/migrations/1773071716018_create-programs-and-components-search-functions.test.ts | Adds unit tests for SQL generation and migration sequencing. |
| mcp-db/data/components-programs.csv | Adds frequency metadata columns and updates/condenses component rows. |
Adds Components and Search functions to return data for the list-survey-programs and list-survey-components tools. Also adds new metadata to the Components table to reduce need to list out individual years data is available in. * Update components-programs CSV with new metadata * Add frequency and frequency_notes columns to Components * Add partial seeding as a migration for Program description and new Component columns to ensure required data for new tools is present * Create list-survey-programs function for returning all survey programs * Create list-survey-components functions that filters Components by their Program.
c4cad55 to
cb70aa2
Compare
Creates a list-survey-programs tool to assist with survey identification prior to fetch tool calls. This is part of a broader update to provide a set of tools that provide better context and richer details while improving token counts (compared to list-datasets). * Create list-survey-programs tool for listing survey programs * Add list-survey-programs tool to ToolRegistry for listing on start * Update ES Lint rules to ignore unused vars starting with _ * Remove Searchable Field from Returned Programs * Remove dist from lint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes several commits that add list-survey-programs and list-survey-components tools to the MCP server. The initial commit adds underlying search functions, and following commits add the tools themselves. Both the list-survey-programs and list-survey-components tools are designed to replace list-datasets, which returns all 1,700 datasets, including years present, and other information, in favor of a streamlined flow that starts broad (listing all 30 programs) and narrows to specific components (requiring filtration) with richer metadata that should improve search-data-tables utilization and the selection of data based on fitness for the use case.