Skip to content

Feature Request: search other libraries for symbols #750

@MatrixManAtYrService

Description

@MatrixManAtYrService

Hi! thanks for your work on Serena, and thanks considering my request:

Is your feature request related to a problem? Please describe.

I have a package which contains clients (python) for

  • many HTTP services that I need to talk to
  • many SQL tables that I need to query

When I'm using Serena to develop that project, I can use natural language to describe what I want, and the LLM will write reasonably smart code which relies on the packaged clients to get the job done. Hurray, nice job Serena.

I have more than one need for this ability, so I have made this a python package and paid special attention to ensuring the type info is made available. This allows me to import it into other (smaller, simpler) projects and get tab completion re: the tables' columns, the http verbs, the http params, and the attributes on the response objects. Hurray, nice job LSP.

But I can see that when I use Serena in those other projects, she can't see into the type information which I have prepared there. I made a smaller example to test this claim:

import pyfiglet
pyfiglet.print_figlet("hello world!", colors="MAGENTA")

pyfiglet supports a font kwarg on print_figlet. It's easy for me to see because when I open my editor in the python virtual environment and place a comma before the ), a small tooltip appears:

(text: str, font: str = DEFAULT_FONT, colors: str = ":", **kwargs: Any) -> None

But if an agent instructs Serena to search for this information, Serena can't find it:

serena - search_for_pattern (MCP)(substring_pattern: "def print_figlet", restrict_search_to_code_files: false, context_lines_after: 10)
  ⎿  {
       "result": "{}"
     }

Describe the solution you'd like

I'd like to be able to configure serena (perhaps via a config file or a cli param) such that she can search among my dependencies as if they were local code. If this is a performance concern, then I'd like to specify only certain libraries for her to index.

Describe alternatives you've considered

I usually launch the agent from inside of a python virtual environment, so I suspect that serena, as a subprocess thereof, will also have access to that environment, but just to be sure I've also configured the agent to explicitly place serena in such an environment:

$ uv run serena start-mcp-server --context ide-assistant --project $PWD

...still no luck.

The workflow I've settled on right now is to use serena in the project with the knowledge to write and tests an exemplar script which shows the various tables and API's that I need the tool to use, and then copy that script over into the project with the task and say "this script works, now incorporate it into the bigger picture here", but it's kind of clunky compared to the possibility that the tool-focuse agent might be able to just import the knowledge from the other project.

I suppose I could also just make it a monorepo but... yuck.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions