Class: Mcp::Tools::WorkItems::GetWorkItemNotesTool
- Inherits:
-
BaseTool
- Object
- GraphqlTool
- BaseTool
- Mcp::Tools::WorkItems::GetWorkItemNotesTool
- Defined in:
- app/services/mcp/tools/work_items/get_work_item_notes_tool.rb
Constant Summary
Constants included from Concerns::Constants
Concerns::Constants::ALL_TYPES, Concerns::Constants::GROUP_ONLY_TYPES, Concerns::Constants::PROJECT_AND_GROUP_TYPES, Concerns::Constants::URL_PATTERNS, Concerns::Constants::VERSIONS
Constants included from Concerns::Versionable
Concerns::Versionable::VERSION_FORMAT
Instance Attribute Summary
Attributes inherited from GraphqlTool
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from GraphqlTool
#execute, #graphql_operation, #initialize, #operation_name
Methods included from Concerns::Versionable
#description, #graphql_operation, #initialize_version, #input_schema, #operation_name, #version
Constructor Details
This class inherits a constructor from Mcp::Tools::GraphqlTool
Class Method Details
.build_query ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'app/services/mcp/tools/work_items/get_work_item_notes_tool.rb', line 8 def build_query <<~GRAPHQL query GetWorkItemNotes($id: WorkItemID!, $after: String, $before: String, $first: Int, $last: Int) { workItem(id: $id) { widgets { ... on WorkItemWidgetNotes { notes(after: $after, before: $before, first: $first, last: $last) { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } nodes { id body internal createdAt updatedAt system systemNoteIconName author { id name username avatarUrl webUrl } discussion { id } } count } } } } } GRAPHQL end |
Instance Method Details
#build_variables ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 |
# File 'app/services/mcp/tools/work_items/get_work_item_notes_tool.rb', line 55 def build_variables work_item_id = resolve_work_item_id { id: work_item_id, after: params[:after], before: params[:before], first: params[:first], last: params[:last] }.compact end |