Blaž Dular
37301e15ae
feat(mcp): add pagination to get_tags and get_categories tools ( #2492 )
...
* feat(mcp): add pagination to get_tags and get_categories tools
Both tools now accept a `page` param and return `total_results`,
`total_pages`, `page`, and `page_size` — matching the pattern used
by get_transactions and get_holdings. Adds a migration for composite
(family_id, name) indexes on tags and categories to support efficient
paginated ordering within a family scope.
* fix(mcp): make page param optional in get_tags/get_categories schema and fix migration version
Page defaults to 1 in call() so marking it required in the JSON schema was incorrect.
Also fixes migration to use ActiveRecord::Migration[7.2] instead of [8.0].
* fix: update schema.rb with family_id+name indexes for tags and categories
* fix(mcp): stable pagination sort and unique family/name indexes on tags and categories
- Make family_id+name indexes unique (matches existing AR uniqueness validations)
- Add id tie-breaker to alphabetically/alphabetically_by_hierarchy scopes
so paginated results are deterministic
* refactor(mcp): replace Pagy::Backend mixin with Pagy.new in model layer
Pagy::Backend is designed for controllers; using it in plain model
classes is fragile. Switch all four assistant functions to call
Pagy.new(count:, page:, limit:) directly and apply offset/limit
on the scope, which is the correct approach for non-controller contexts.
2026-08-12 23:55:05 +02:00
..
2026-06-02 15:55:05 +02:00
2026-02-02 16:27:02 +01:00
2026-02-02 16:27:02 +01:00
2025-03-19 12:36:16 -04:00
2025-02-11 10:40:30 -06:00
2025-02-10 15:31:28 -05:00
2025-02-11 10:40:30 -06:00
2025-02-11 10:40:30 -06:00
2025-02-12 12:59:35 -06:00
2025-02-21 11:57:59 -05:00
2025-02-24 10:00:24 -05:00
2025-02-24 11:08:05 -05:00
2025-03-03 12:47:30 -05:00
2025-03-07 10:05:54 -05:00
2025-04-18 10:48:10 -04:00
2025-03-17 11:54:53 -04:00
2025-03-17 11:54:53 -04:00
2025-03-17 11:54:53 -04:00
2025-03-19 12:36:16 -04:00
2025-03-19 12:36:16 -04:00
2025-03-28 13:08:22 -04:00
2025-04-14 09:09:25 -04:00
2025-04-11 09:28:00 -05:00
2025-04-11 12:13:46 -04:00
2025-04-14 11:40:34 -04:00
2025-04-18 11:39:58 -04:00
2025-04-18 11:39:58 -04:00
2025-04-18 12:09:46 -04:00
2025-05-13 15:53:13 -04:00
2025-05-01 16:47:14 -04:00
2025-05-06 14:05:21 -04:00
2025-05-09 14:56:49 -04:00
2025-05-15 10:19:56 -04:00
2025-05-13 08:32:53 -04:00
2025-05-15 10:19:56 -04:00
2025-05-16 14:17:56 -04:00
2025-05-18 15:02:51 -04:00
2025-05-22 12:43:24 -04:00
2025-05-22 16:11:22 -04:00
2025-05-23 18:58:22 -04:00
2025-06-09 10:18:52 -04:00
2025-06-10 18:20:06 -04:00
2025-06-17 15:57:05 -05:00
2025-06-17 15:57:05 -05:00
2025-06-17 15:57:05 -05:00
2025-06-17 15:57:05 -05:00
2025-06-17 15:57:05 -05:00
2025-06-17 15:57:05 -05:00
2025-06-17 15:57:05 -05:00
2025-06-20 13:31:58 -04:00
2025-06-18 08:38:04 -05:00
2025-06-18 08:38:04 -05:00
2025-06-18 08:38:04 -05:00
2025-06-18 08:20:22 -05:00
2025-06-20 17:10:36 -04:00
2025-06-23 11:31:57 -05:00
2025-07-03 09:33:07 -04:00
2025-07-09 09:22:51 -05:00
2025-07-15 11:42:41 -04:00
2025-07-18 08:19:44 -04:00
2025-07-23 10:06:25 -04:00
2025-07-24 10:50:05 -04:00
2025-08-11 22:58:44 +02:00
2025-10-21 18:22:24 +02:00
2025-08-12 02:59:16 +02:00
2025-08-12 02:59:16 +02:00
2025-08-12 02:59:16 +02:00
2025-08-12 02:59:16 +02:00
2025-08-12 02:59:16 +02:00
2025-08-12 02:59:16 +02:00
2025-08-12 02:59:16 +02:00
2025-08-12 02:59:16 +02:00
2025-10-22 19:51:24 +02:00
2025-10-22 19:51:24 +02:00
2025-10-22 19:51:24 +02:00
2025-10-22 19:51:24 +02:00
2025-10-22 19:51:24 +02:00
2025-10-22 19:51:24 +02:00
2025-10-22 19:51:24 +02:00
2025-10-24 00:08:59 +02:00
2025-10-24 00:08:59 +02:00
2025-10-24 16:07:45 +02:00
2025-10-26 15:50:45 +01:00
2025-10-28 19:32:27 +01:00
2025-10-28 19:32:27 +01:00
2025-10-28 19:32:27 +01:00
2025-10-28 19:32:27 +01:00
2025-10-28 19:32:27 +01:00
2025-10-28 19:32:27 +01:00
2025-10-28 19:32:27 +01:00
2025-10-28 19:32:27 +01:00
2025-10-28 19:32:27 +01:00
2025-10-30 14:07:16 +01:00
2025-10-30 14:07:16 +01:00
2025-11-17 21:51:37 +01:00
2026-02-09 11:09:25 +01:00
2025-11-17 21:51:37 +01:00
2025-11-01 09:12:42 +01:00
2025-11-17 21:51:37 +01:00
2025-12-15 09:47:16 +01:00
2025-11-17 21:51:37 +01:00
2025-11-10 12:02:43 +01:00
2025-11-14 00:31:12 +01:00
2025-11-11 19:51:07 +01:00
2025-11-11 19:51:07 +01:00
2025-11-17 21:51:37 +01:00
2025-12-24 00:59:50 +01:00
2025-12-07 13:20:54 +01:00
2025-11-26 17:51:38 +01:00
2025-11-22 02:14:29 +01:00
2025-11-22 02:14:29 +01:00
2025-12-07 16:30:02 +01:00
2026-01-09 13:03:40 +01:00
2025-11-29 13:31:08 +01:00
2025-12-07 18:11:34 +01:00
2025-12-07 18:11:34 +01:00
2025-12-17 16:03:05 +01:00
2026-01-23 22:05:28 +01:00
2026-01-07 15:59:04 +01:00
2026-01-10 16:39:18 +01:00
2026-01-23 22:12:02 +01:00
2025-12-27 02:21:28 +03:30
2026-01-03 17:56:42 -05:00
2026-01-03 17:56:42 -05:00
2026-01-03 17:56:42 -05:00
2026-01-03 17:56:42 -05:00
2026-01-10 18:51:58 +01:00
2026-01-07 16:16:01 +01:00
2026-01-09 11:54:38 +01:00
2026-01-09 13:14:14 +01:00
2026-01-09 19:38:04 +01:00
2026-01-09 19:38:04 +01:00
2026-04-19 11:16:04 +02:00
2026-01-12 15:35:38 -05:00
2026-01-12 15:35:14 -05:00
2026-01-12 14:05:46 +01:00
2026-01-12 14:05:46 +01:00
2026-01-16 21:04:10 +01:00
2026-01-16 21:04:10 +01:00
2026-01-16 12:34:06 +01:00
2026-01-16 12:34:06 +01:00
2026-01-18 11:27:09 +01:00
2026-01-30 20:44:25 +01:00
2026-01-18 17:29:02 +01:00
2026-01-23 12:54:55 +01:00
2026-01-21 22:56:39 +01:00
2026-01-22 20:37:07 +01:00
2026-01-22 20:52:49 +01:00
2026-01-22 20:52:49 +01:00
2026-01-22 20:52:49 +01:00
2026-01-23 18:55:51 +01:00
2026-01-24 11:16:26 +01:00
2026-01-24 22:00:41 +01:00
2026-02-04 23:58:09 +01:00
2026-01-30 20:44:25 +01:00
2026-02-06 00:45:11 +01:00
2026-02-08 18:19:37 +01:00
2026-02-08 18:19:37 +01:00
2026-02-10 23:30:45 +01:00
2026-02-13 19:30:29 +01:00
2026-02-11 15:22:56 +01:00
2026-02-19 18:07:47 +01:00
2026-02-19 19:51:42 +01:00
2026-02-23 07:38:58 -05:00
2026-03-19 15:17:55 +01:00
2026-03-21 01:03:19 +01:00
2026-03-19 15:17:55 +01:00
2026-03-20 14:52:09 +01:00
2026-03-19 15:17:55 +01:00
2026-03-19 15:17:55 +01:00
2026-03-03 21:10:53 +01:00
2026-03-15 21:26:26 +01:00
2026-03-11 15:54:01 +01:00
2026-03-14 11:32:33 +01:00
2026-03-14 20:14:18 +01:00
2026-06-08 21:35:12 +02:00
2026-03-20 21:19:30 +01:00
2026-03-28 19:03:16 +01:00
2026-03-25 10:50:23 +01:00
2026-03-25 10:50:23 +01:00
2026-03-25 10:50:23 +01:00
2026-03-25 10:50:23 +01:00
2026-05-02 12:55:44 +02:00
2026-04-01 20:25:06 +02:00
2026-04-01 20:25:06 +02:00
2026-03-29 10:08:54 +02:00
2026-04-07 14:43:17 +02:00
2026-07-30 02:29:13 +02:00
2026-04-10 23:19:48 +02:00
2026-04-09 18:33:59 +02:00
2026-04-09 18:33:59 +02:00
2026-04-13 19:53:04 +02:00
2026-04-10 15:43:22 +02:00
2026-04-11 21:32:20 +02:00
2026-04-13 00:51:23 +02:00
2026-04-29 15:30:04 +02:00
2026-05-12 00:37:47 +02:00
2026-05-03 22:13:28 +02:00
2026-05-05 01:12:48 +02:00
2026-05-02 10:02:42 +00:00
2026-05-05 01:20:57 +02:00
2026-05-13 18:13:48 +02:00
2026-05-13 21:05:11 +02:00
2026-05-08 15:15:23 +02:00
2026-05-09 21:55:20 +02:00
2026-05-09 21:55:20 +02:00
2026-05-10 22:13:57 +02:00
2026-05-12 00:22:37 +02:00
2026-06-02 14:00:16 +02:00
2026-05-12 23:45:19 +02:00
2026-05-12 23:45:19 +02:00
2026-05-12 23:45:19 +02:00
2026-06-04 11:48:44 +02:00
2026-05-30 00:22:25 +02:00
2026-06-02 14:00:16 +02:00
2026-05-17 16:55:01 +02:00
2026-05-19 14:41:02 +02:00
2026-05-20 21:35:22 +02:00
2026-06-02 21:44:57 +02:00
2026-06-02 21:44:57 +02:00
2026-06-01 22:00:48 +02:00
2026-05-30 23:29:37 +02:00
2026-06-06 16:33:32 +02:00
2026-06-01 22:02:01 +02:00
2026-06-04 22:11:51 +02:00
2026-06-08 21:35:12 +02:00
2026-06-05 11:06:13 +00:00
2026-06-16 17:22:59 +02:00
2026-06-11 14:39:36 +02:00
2026-06-18 20:18:18 +02:00
2026-07-25 03:35:35 +02:00
2026-06-20 20:33:09 +02:00
2026-07-14 03:16:28 +02:00
2026-06-28 16:46:39 +00:00
2026-07-25 04:54:30 +02:00
2026-07-25 04:54:30 +02:00
2026-06-30 06:55:29 +02:00
2026-06-30 07:26:23 +02:00
2026-07-08 09:00:49 +02:00
2026-06-27 06:43:12 +02:00
2026-07-17 23:00:18 +02:00
2026-07-08 09:00:49 +02:00
2026-07-30 02:29:13 +02:00
2026-07-26 01:54:49 +02:00
2026-06-28 18:39:28 +00:00
2026-06-28 19:47:53 +00:00
2026-07-14 02:19:39 +02:00
2026-07-17 07:22:50 +02:00
2026-07-24 22:45:44 +02:00
2026-07-14 02:19:39 +02:00
2026-07-17 06:57:54 +02:00
2026-07-25 04:47:58 +02:00
2026-07-25 04:47:58 +02:00
2026-07-25 04:47:58 +02:00
2026-07-25 04:47:58 +02:00
2026-07-26 07:40:25 +02:00
2026-08-04 23:03:12 +02:00
2026-08-12 23:55:05 +02:00
2026-08-11 23:21:08 +02:00