Skip to content

DataAnalyst resources#7591

Merged
labkey-matthewb merged 7 commits intorelease26.3-SNAPSHOTfrom
26.3_fb_mcp_dataanalyst
Apr 17, 2026
Merged

DataAnalyst resources#7591
labkey-matthewb merged 7 commits intorelease26.3-SNAPSHOTfrom
26.3_fb_mcp_dataanalyst

Conversation

@labkey-matthewb
Copy link
Copy Markdown
Contributor

@labkey-matthewb labkey-matthewb commented Apr 16, 2026

Rationale

Additional resources to support MCP user scenarios, specifically data analysis.

Related Pull Requests

Changes

@github-actions
Copy link
Copy Markdown

WARNING: This PR appears to have the default title generated by GitHub. Please use something more descriptive.

@labkey-matthewb labkey-matthewb changed the title 26.3 fb mcp dataanalyst DataAnalyst resources Apr 16, 2026
@labkey-matthewb labkey-matthewb marked this pull request as ready for review April 16, 2026 18:48
Copy link
Copy Markdown
Contributor

@labkey-jeckels labkey-jeckels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but it would be nice for @cnathe and @labkey-alan to give it a quick review as the client API owners.

Comment on lines +29 to +47
A LabKey MCP server is configured (see `.mcp.json`). Use these tools to explore the server interactively:

| Tool | Purpose |
|---|---|
| `mcp__labkey__setContainer` | **Must be called first.** Sets the active container (project/folder) for subsequent calls. Path format: `MyProject/MyFolder` (no leading slash). |
| `mcp__labkey__whereAmIWhoAmITalkingTo` | Shows current user, server info, and active container. |
| `mcp__labkey__listContainers` | Lists all containers the user has read access to. |
| `mcp__labkey__listSchemas` | Lists all schemas in the active container. |
| `mcp__labkey__listTables` | Lists tables/queries within a schema. |
| `mcp__labkey__listColumns` | Shows column metadata (name, type, description) for a table. Also returns SQL source for saved queries. |
| `mcp__labkey__getSourceForSavedQuery` | Returns the SQL source of a saved query. |
| `mcp__labkey__validateSQL` | Validates LabKey SQL syntax without executing it. |

### MCP Workflow

1. Call `listContainers` to find available containers
2. Call `setContainer` with the desired container path
3. Use `listSchemas` -> `listTables` -> `listColumns` to explore the data model
4. Use `validateSQL` to check queries before running them
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we share this or other common blocks? I imagine it'll need updates as we build out MCP.

Comment thread core/src/org/labkey/core/CoreMcp.java Outdated
labkey-matthewb and others added 2 commits April 16, 2026 15:16
Co-authored-by: Josh Eckels <jeckels@labkey.com>
Copy link
Copy Markdown
Contributor

@labkey-alan labkey-alan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python documentation looks correct. I am not a huge fan that we are adding a third place that has documentation for our Python API, but we can find a better solution for that later.

@labkey-matthewb labkey-matthewb merged commit f979e57 into release26.3-SNAPSHOT Apr 17, 2026
7 of 9 checks passed
@labkey-matthewb labkey-matthewb deleted the 26.3_fb_mcp_dataanalyst branch April 17, 2026 00:33
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.

3 participants