Skip to content

Calculated Column Expression Assistant#7665

Merged
labkey-nicka merged 37 commits into
developfrom
fb_mcp_calc_cols
May 16, 2026
Merged

Calculated Column Expression Assistant#7665
labkey-nicka merged 37 commits into
developfrom
fb_mcp_calc_cols

Conversation

@labkey-nicka
Copy link
Copy Markdown
Contributor

@labkey-nicka labkey-nicka commented May 13, 2026

Rationale

This introduces the calculated column expression assistant endpoint.

Related Pull Requests

Changes

  • Introduce conversationId to AbstractAgentAction to track conversation. Allows for clients to easily start and track conversation.
  • Add ExpressionAssistantAgentAction that is the endpoint for the expression assistant
  • Add validateCalculatedColumnExpression MCP tool that is used by expression assistant to validate expressions it creates
  • Introduce @McpInternal annotation for MCP tools that are not intended for exposure to external services
  • Update McpContext to support supplying context beyond container and user
  • Add LABKEY.mcpReady flag to page context

Copy link
Copy Markdown
Contributor

@labkey-matthewb labkey-matthewb left a comment

Choose a reason for hiding this comment

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

I think we may need to give stronger guidance about injecting CAST(), as this generally will generate a runtime error rather than a parse error. Or we can try to generate execute a test SQL statement??? Not required for commit.

Comment thread api/src/org/labkey/api/mcp/AbstractAgentAction.java
@labkey-nicka labkey-nicka removed the request for review from labkey-adam May 14, 2026 17:02
Copy link
Copy Markdown
Contributor

@cnathe cnathe left a comment

Choose a reason for hiding this comment

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

I reviewed the client side code changes. Looks good.

2. date/time calculation
3. conditional logic / flagging
4. string concatenation or formatting
5. lookup or join to another table
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.

we don't allow lookups or joins to other tables in our current calc column implementation right? is this something we'd want to include if not supported.

@labkey-nicka labkey-nicka merged commit b8485f2 into develop May 16, 2026
8 of 15 checks passed
@labkey-nicka labkey-nicka deleted the fb_mcp_calc_cols branch May 16, 2026 00:46
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