Class: LinearToonMcp::Tools::ListProjects

Inherits:
List
  • Object
show all
Defined in:
lib/linear_toon_mcp/tools/list_projects.rb

Overview

List projects in the Linear workspace, optionally scoped to a team. Returns TOON-encoded array of projects with id, name, and state.

Constant Summary collapse

QUERY =
<<~GRAPHQL
  query($filter: ProjectFilter) {
    projects(filter: $filter) { nodes { id name state } }
  }
GRAPHQL

Instance Method Summary collapse

Methods inherited from List

connection, connection_name, #perform, query_string

Methods inherited from Base

call, #call, error_response, #perform, success_response

Instance Method Details

#variables(team: nil) ⇒ Object

Parameters:

  • team (String, nil) (defaults to: nil)

    team name or UUID (optional scope)



30
31
32
33
34
# File 'lib/linear_toon_mcp/tools/list_projects.rb', line 30

def variables(team: nil)
  return {} unless team
  team_id = Resolvers::Team.call(value: team)
  {filter: {accessibleTeams: {id: {eq: team_id}}}}
end