MetadataBuilder should be able to use current function spec or read the spec from behaviour/protocol. Example https://github.com/elixir-lsp/elixir-ls/issues/193#issuecomment-1456727191