Class McpDeveloperToolsConfig

java.lang.Object
com.ssgllc.fish.config.mcp.McpDeveloperToolsConfig

@Configuration public class McpDeveloperToolsConfig extends Object
MCP tool configuration for developer productivity: report testing, SpEL expression evaluation, Groovy script execution, and per-request debug logging.

Provides nineteen tools across five groups:

Report tools

  • validate-report — parse SQL template, extract parameters and output columns
  • test-report-output — execute with supplied parameter values (max 25 rows)
  • test-full-report — smoke-test with auto-generated dummy values
  • validate-sql — validate raw SQL against the application data model

SpEL expression tools

  • test-spel-expression — evaluate against a real entity instance
  • test-match-expression — score a deduplication match between two instances
  • test-merge-expression — evaluate a merge survivorship expression
  • test-attribute-expression — test a boolean security expression, with optional user impersonation via ConfigTestService.testAttributeExpression(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

Function catalogue tools

Split by dialect because the reachable sets differ: SpEL resolves only the statics ExpressionFunctions registered, while Groovy also reaches the published utilities and any Spring bean by name. Three levels of detail, so a caller pays only for what it needs.

  • list-spel-classes / list-groovy-classes — callable classes, one summary each
  • list-spel-functions / list-groovy-functions — functions, optionally scoped to one class, with a one-line summary each
  • describe-class — one class in full, including the prose the listings truncate
  • describe-function — one function in full: description, usage examples, parameters, return value, deprecation, since

Descriptions come from the javadoc on the methods themselves, delivered by the build's json-doclet pass, so they cannot drift from the code. A member with no javadoc is still listed, with its signature and no description.

Groovy script tools

  • execute-groovy-script — run a Groovy script with optional bound variables
  • execute-text-template — execute a named TextTemplate script
  • test-entity-lifecycle-script — run with lifecycle-event-bound variables
  • test-process-script — run in the context of a running process instance

Debug logging tools

  • set-debug-logging — create a per-request debug token for specified packages
  • get-debug-logs — retrieve captured log lines for a debug token

Also registers three MCP prompts (report-development-guide, spel-expression-guide, groovy-script-guide) and one resource (file://spel-functions.json).

Active only when spring.ai.mcp.server.enabled=true.

See Also:
  • ReportService
  • ConfigTestService
  • ApplicationService
  • PerRequestDebugService
  • Constructor Details

    • McpDeveloperToolsConfig

      public McpDeveloperToolsConfig()
  • Method Details

    • developerPrompts

      @Bean public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncPromptSpecification> developerPrompts()
    • developerResources

      @Bean public List<io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncResourceSpecification> developerResources(com.fasterxml.jackson.databind.ObjectMapper mapper, @Lazy com.ssgllc.fish.expr.doc.FunctionCatalogService functionCatalogService)