feat: add reminders_remove tool for single-reminder removal
- reminders_remove(index) removes one reminder by 1-based index - reminders_list now returns numbered output (1. heading / body) so any model can easily identify which index to pass - _parse_sections() / _sections_to_text() helpers for clean round-trip - Not in CONFIRM_REQUIRED — targeted removal is safe without a gate Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,7 @@ from tools.cron import (
|
||||
from tools.reminders import (
|
||||
reminders_add as _reminders_add,
|
||||
reminders_list as _reminders_list,
|
||||
reminders_remove as _reminders_remove,
|
||||
reminders_clear as _reminders_clear,
|
||||
)
|
||||
from tools.scratch import (
|
||||
@@ -308,6 +309,7 @@ _CALLABLES: dict[str, callable] = {
|
||||
"cron_toggle": _cron_toggle,
|
||||
"reminders_add": _reminders_add,
|
||||
"reminders_list": _reminders_list,
|
||||
"reminders_remove": _reminders_remove,
|
||||
"reminders_clear": _reminders_clear,
|
||||
"scratch_read": _scratch_read,
|
||||
"scratch_write": _scratch_write,
|
||||
@@ -584,6 +586,24 @@ _reminders_list_declaration = types.FunctionDeclaration(
|
||||
parameters=types.Schema(type=types.Type.OBJECT, properties={}),
|
||||
)
|
||||
|
||||
_reminders_remove_declaration = types.FunctionDeclaration(
|
||||
name="reminders_remove",
|
||||
description=(
|
||||
"Remove a single reminder by its number. "
|
||||
"Call reminders_list first to get the numbered list, then pass the number of the reminder to remove."
|
||||
),
|
||||
parameters=types.Schema(
|
||||
type=types.Type.OBJECT,
|
||||
properties={
|
||||
"index": types.Schema(
|
||||
type=types.Type.INTEGER,
|
||||
description="The number of the reminder to remove (1 = first item in reminders_list output).",
|
||||
),
|
||||
},
|
||||
required=["index"],
|
||||
),
|
||||
)
|
||||
|
||||
_reminders_clear_declaration = types.FunctionDeclaration(
|
||||
name="reminders_clear",
|
||||
description=(
|
||||
@@ -864,6 +884,7 @@ _ALL_DECLARATIONS: list[types.FunctionDeclaration] = [
|
||||
_cron_toggle_declaration,
|
||||
_reminders_add_declaration,
|
||||
_reminders_list_declaration,
|
||||
_reminders_remove_declaration,
|
||||
_reminders_clear_declaration,
|
||||
_scratch_read_declaration,
|
||||
_scratch_write_declaration,
|
||||
|
||||
Reference in New Issue
Block a user