Build tool integration: Scan project dependencies #12

Open
opened 2026-01-05 21:12:45 +00:00 by mprihoda · 0 comments
mprihoda commented 2026-01-05 21:12:45 +00:00 (Migrated from github.com)

Problem

Currently, the agent must know exact Maven/Coursier coordinates to look up documentation. This creates friction:

  • Agent doesn't know which library provides a class
  • Agent must guess or ask about versions
  • No awareness of what's available in the project

Proposed Solution

Add ability to spawn MCP from a project directory and scan build files for dependencies.

Build Tools to Support

  • sbt: build.sbt, project/*.scala
  • scala-cli: project.scala, //> using dep directives
  • Maven: pom.xml
  • Gradle: build.gradle, build.gradle.kts

New Tool: list_project_dependencies

{
  "name": "list_project_dependencies",
  "description": "List all dependencies from the project's build file",
  "input": {
    "projectPath": "optional, defaults to current directory",
    "includeTransitive": "optional, default false"
  }
}

Returns: List of coordinates with versions currently in use.

Value for Agent

  • Understands what libraries are available without guessing
  • Can verify if a suggested library is actually in the project
  • Foundation for find_class tool (next issue)

Technical Considerations

  • May need to invoke build tool (sbt, scala-cli) for transitive deps
  • Could cache dependency list per project
  • Consider: Should MCP be started per-project or accept project path per-request?

Acceptance Criteria

  • Scan scala-cli project.scala for dependencies
  • Scan sbt build.sbt for libraryDependencies
  • Return structured list of (groupId, artifactId, version, scalaVersion)
  • Handle multi-module projects (at least top-level)
## Problem Currently, the agent must know exact Maven/Coursier coordinates to look up documentation. This creates friction: - Agent doesn't know which library provides a class - Agent must guess or ask about versions - No awareness of what's available in the project ## Proposed Solution Add ability to spawn MCP from a project directory and scan build files for dependencies. ### Build Tools to Support - **sbt**: `build.sbt`, `project/*.scala` - **scala-cli**: `project.scala`, `//> using dep` directives - **Maven**: `pom.xml` - **Gradle**: `build.gradle`, `build.gradle.kts` ### New Tool: `list_project_dependencies` ```json { "name": "list_project_dependencies", "description": "List all dependencies from the project's build file", "input": { "projectPath": "optional, defaults to current directory", "includeTransitive": "optional, default false" } } ``` **Returns:** List of coordinates with versions currently in use. ## Value for Agent - Understands what libraries are available without guessing - Can verify if a suggested library is actually in the project - Foundation for `find_class` tool (next issue) ## Technical Considerations - May need to invoke build tool (sbt, scala-cli) for transitive deps - Could cache dependency list per project - Consider: Should MCP be started per-project or accept project path per-request? ## Acceptance Criteria - [ ] Scan scala-cli `project.scala` for dependencies - [ ] Scan sbt `build.sbt` for libraryDependencies - [ ] Return structured list of (groupId, artifactId, version, scalaVersion) - [ ] Handle multi-module projects (at least top-level)
Sign in to join this conversation.
No description provided.