Skip to main content
Glama

Bitrise MCP Server

Official
by bitrise-io
roots.go1 kB
package server import ( "context" "errors" "github.com/mark3labs/mcp-go/mcp" ) var ( // ErrNoClientSession is returned when there is no active client session in the context ErrNoClientSession = errors.New("no active client session") // ErrRootsNotSupported is returned when the session does not support roots ErrRootsNotSupported = errors.New("session does not support roots") ) // RequestRoots sends an list roots request to the client. // The client must have declared roots capability during initialization. // The session must implement SessionWithRoots to support this operation. func (s *MCPServer) RequestRoots(ctx context.Context, request mcp.ListRootsRequest) (*mcp.ListRootsResult, error) { session := ClientSessionFromContext(ctx) if session == nil { return nil, ErrNoClientSession } // Check if the session supports roots requests if rootsSession, ok := session.(SessionWithRoots); ok { return rootsSession.ListRoots(ctx, request) } return nil, ErrRootsNotSupported }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bitrise-io/bitrise-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server