Class: LinearToonMcp::Tools::GetIssueStatus
- Defined in:
- lib/linear_toon_mcp/tools/get_issue_status.rb
Overview
Fetch a single workflow state (issue status) by name or UUID, scoped to a team.
Constant Summary collapse
- QUERY =
<<~GRAPHQL query($id: String!) { workflowState(id: $id) { id name type description color position team { id name } } } GRAPHQL
Instance Method Summary collapse
Methods inherited from Get
entity, entity_label, entity_name, #not_found_message, query_string, #variables
Methods inherited from Base
call, #call, error_response, success_response
Instance Method Details
#perform(query:, team:) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/linear_toon_mcp/tools/get_issue_status.rb', line 39 def perform(query:, team:) team_id = Resolvers::Team.call(value: team) state_id = Resolvers::WorkflowState.call(value: query, team_id: team_id) data = client.query(QUERY, variables: {id: state_id}) data["workflowState"] or raise Error, "Issue status not found: #{query}" end |