fix(ai): resolve tool name + parameter drift between catalog and webapp
Some checks are pending
CD Mac Mini / Detect Changes (push) Waiting to run
CD Mac Mini / Deploy (push) Blocked by required conditions
CI / Detect Changes (push) Waiting to run
CI / Validate (push) Waiting to run
CI / Auth flow integration test (push) Waiting to run
CI / Build mana-auth (push) Blocked by required conditions
CI / Build mana-search (push) Blocked by required conditions
CI / Build mana-sync (push) Blocked by required conditions
CI / Build mana-notify (push) Blocked by required conditions
CI / Build mana-api-gateway (push) Blocked by required conditions
CI / Build mana-crawler (push) Blocked by required conditions
CI / Build mana-media (push) Blocked by required conditions
CI / Build mana-credits (push) Blocked by required conditions
CI / Build mana-web (push) Blocked by required conditions
CI / Build chat-backend (push) Blocked by required conditions
CI / Build chat-web (push) Blocked by required conditions
CI / Build todo-backend (push) Blocked by required conditions
CI / Build todo-web (push) Blocked by required conditions
CI / Build calendar-backend (push) Blocked by required conditions
CI / Build calendar-web (push) Blocked by required conditions
CI / Build clock-web (push) Blocked by required conditions
CI / Build contacts-backend (push) Blocked by required conditions
CI / Build contacts-web (push) Blocked by required conditions
CI / Build presi-web (push) Blocked by required conditions
CI / Build storage-backend (push) Blocked by required conditions
CI / Build storage-web (push) Blocked by required conditions
CI / Build telegram-stats-bot (push) Blocked by required conditions
CI / Build food-backend (push) Blocked by required conditions
CI / Build food-web (push) Blocked by required conditions
CI / Build skilltree-web (push) Blocked by required conditions
Docker Validate / Validate Dockerfiles (push) Waiting to run
Docker Validate / Build calendar-web (push) Blocked by required conditions
Docker Validate / Build quotes-web (push) Blocked by required conditions
Docker Validate / Build todo-backend (push) Blocked by required conditions
Docker Validate / Build todo-web (push) Blocked by required conditions
Docker Validate / Build mana-auth (push) Blocked by required conditions
Docker Validate / Build mana-sync (push) Blocked by required conditions
Docker Validate / Build mana-media (push) Blocked by required conditions
Mirror to Forgejo / Push to Forgejo (push) Waiting to run

8 mismatches fixed between AI_TOOL_CATALOG and webapp module tools:

Tool name renames (webapp → catalog name):
- record_visit → visit_place (places)
- undo_last_drink → undo_drink (drink)
- location_log → get_current_location (places, catalog side)

Catalog parameter fixes (aligned to webapp execute functions):
- create_event: startIso/endIso → startTime/endTime + isAllDay/location/description
- create_note: title required→optional, content optional→required
- complete_tasks_by_title: titleSubstring → titleMatch
- create_place: add latitude/longitude (required) + category enum + address
- create_journal_entry: English mood enum → German mood enum

Webapp parameter additions:
- create_contact: add company + notes params (store already accepts them)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-16 13:18:51 +02:00
parent 299cf9cf72
commit 56171ff13b
4 changed files with 70 additions and 21 deletions

View file

@ -13,8 +13,15 @@ export const contactsTools: ModuleTool[] = [
parameters: [
{ name: 'firstName', type: 'string', description: 'Vorname', required: true },
{ name: 'lastName', type: 'string', description: 'Nachname', required: false },
{ name: 'email', type: 'string', description: 'E-Mail', required: false },
{ name: 'phone', type: 'string', description: 'Telefon', required: false },
{ name: 'email', type: 'string', description: 'E-Mail-Adresse', required: false },
{ name: 'phone', type: 'string', description: 'Telefonnummer', required: false },
{ name: 'company', type: 'string', description: 'Firma / Organisation', required: false },
{
name: 'notes',
type: 'string',
description: 'Freitext-Notizen zum Kontakt',
required: false,
},
],
async execute(params) {
const contact = await contactsStore.createContact({
@ -22,6 +29,8 @@ export const contactsTools: ModuleTool[] = [
lastName: params.lastName as string | undefined,
email: params.email as string | undefined,
phone: params.phone as string | undefined,
company: params.company as string | undefined,
notes: params.notes as string | undefined,
});
return { success: true, data: contact, message: `Kontakt "${params.firstName}" erstellt` };
},

View file

@ -83,9 +83,9 @@ export const drinkTools: ModuleTool[] = [
},
},
{
name: 'undo_last_drink',
name: 'undo_drink',
module: 'drink',
description: 'Macht den letzten Getraenk-Eintrag rueckgaengig',
description: 'Macht den letzten Drink-Eintrag rückgängig',
parameters: [],
async execute() {
await drinkStore.undoLastEntry();

View file

@ -53,9 +53,9 @@ export const placesTools: ModuleTool[] = [
},
},
{
name: 'record_visit',
name: 'visit_place',
module: 'places',
description: 'Registriert einen Besuch an einem bekannten Ort',
description: 'Vermerkt einen Besuch an einem bereits erfassten Ort',
parameters: [{ name: 'placeId', type: 'string', description: 'ID des Ortes', required: true }],
async execute(params) {
await placesStore.recordVisit(params.placeId as string);

View file

@ -69,13 +69,14 @@ export const AI_TOOL_CATALOG: readonly ToolSchema[] = [
{
name: 'complete_tasks_by_title',
module: 'todo',
description: 'Markiert alle Tasks deren Titel den Substring enthält (case-insensitive)',
description:
'Markiert alle offenen Tasks mit dem gegebenen Titel als erledigt (case-insensitive Substring-Match). Nutze diese, wenn der Nutzer eine Task per Name erledigen will und du nicht ihre ID kennst.',
defaultPolicy: 'propose',
parameters: [
{
name: 'titleSubstring',
name: 'titleMatch',
type: 'string',
description: 'Teil des Task-Titels',
description: 'Titel oder Teil davon',
required: true,
},
],
@ -115,12 +116,20 @@ export const AI_TOOL_CATALOG: readonly ToolSchema[] = [
{
name: 'create_event',
module: 'calendar',
description: 'Erstellt einen Kalender-Event',
description: 'Erstellt einen neuen Kalender-Termin',
defaultPolicy: 'propose',
parameters: [
{ name: 'title', type: 'string', description: 'Event-Titel', required: true },
{ name: 'startIso', type: 'string', description: 'Start (ISO)', required: true },
{ name: 'endIso', type: 'string', description: 'Ende (ISO)', required: false },
{ name: 'title', type: 'string', description: 'Titel des Termins', required: true },
{
name: 'startTime',
type: 'string',
description: 'Startzeit (ISO 8601)',
required: true,
},
{ name: 'endTime', type: 'string', description: 'Endzeit (ISO 8601)', required: true },
{ name: 'isAllDay', type: 'boolean', description: 'Ganztaegig', required: false },
{ name: 'location', type: 'string', description: 'Ort', required: false },
{ name: 'description', type: 'string', description: 'Beschreibung', required: false },
],
},
{
@ -138,12 +147,12 @@ export const AI_TOOL_CATALOG: readonly ToolSchema[] = [
description: 'Erstellt eine neue Notiz. Gibt die ID der angelegten Notiz zurueck.',
defaultPolicy: 'propose',
parameters: [
{ name: 'title', type: 'string', description: 'Titel der Notiz', required: true },
{ name: 'title', type: 'string', description: 'Titel der Notiz', required: false },
{
name: 'content',
type: 'string',
description: 'Inhalt der Notiz (Markdown)',
required: false,
required: true,
},
],
},
@ -224,11 +233,33 @@ export const AI_TOOL_CATALOG: readonly ToolSchema[] = [
{
name: 'create_place',
module: 'places',
description: 'Fügt einen neuen Ort hinzu',
description: 'Erstellt einen neuen Ort',
defaultPolicy: 'propose',
parameters: [
{ name: 'name', type: 'string', description: 'Name des Ortes', required: true },
{ name: 'category', type: 'string', description: 'Kategorie', required: false },
{ name: 'latitude', type: 'number', description: 'Breitengrad', required: true },
{ name: 'longitude', type: 'number', description: 'Laengengrad', required: true },
{
name: 'category',
type: 'string',
description: 'Kategorie',
required: false,
enum: [
'home',
'work',
'food',
'shopping',
'sport',
'culture',
'nature',
'transport',
'health',
'education',
'nightlife',
'other',
],
},
{ name: 'address', type: 'string', description: 'Adresse', required: false },
],
},
{
@ -246,7 +277,7 @@ export const AI_TOOL_CATALOG: readonly ToolSchema[] = [
parameters: [],
},
{
name: 'location_log',
name: 'get_current_location',
module: 'places',
description: 'Gibt die aktuelle GPS-Position zurueck (erfordert Standort-Berechtigung)',
defaultPolicy: 'auto',
@ -387,13 +418,13 @@ export const AI_TOOL_CATALOG: readonly ToolSchema[] = [
name: 'create_journal_entry',
module: 'journal',
description:
'Erstellt einen neuen Tagebuch-Eintrag fuer den heutigen Tag. Gibt die ID zurueck.',
'Erstellt einen neuen Journal-Eintrag mit optionaler Stimmung (dankbar, glücklich, zufrieden, neutral, nachdenklich, traurig, gestresst, wütend)',
defaultPolicy: 'propose',
parameters: [
{
name: 'content',
type: 'string',
description: 'Inhalt des Eintrags (Markdown)',
description: 'Inhalt des Eintrags',
required: true,
},
{ name: 'title', type: 'string', description: 'Optionaler Titel', required: false },
@ -402,7 +433,16 @@ export const AI_TOOL_CATALOG: readonly ToolSchema[] = [
type: 'string',
description: 'Stimmung',
required: false,
enum: ['great', 'good', 'neutral', 'bad', 'terrible'],
enum: [
'dankbar',
'glücklich',
'zufrieden',
'neutral',
'nachdenklich',
'traurig',
'gestresst',
'wütend',
],
},
],
},