8000 docs(quest): surface objective type enum and update_objective characterId requirement by Mnehmos · Pull Request #52 · Mnehmos/mnehmos.rpg.mcp · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/server/consolidated/quest-manage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ const definitions: Record<QuestManageAction, ActionDefinition> = {
schema: UpdateObjectiveSchema,
handler: handleUpdateObjective,
aliases: ['progress', 'advance'],
description: 'Update objective progress'
description: 'Update objective progress (requires characterId — quest must be active for that character)'
},
complete_objective: {
schema: CompleteObjectiveSchema,
Expand Down Expand Up @@ -521,10 +521,19 @@ Aliases: new→create, accept→assign, progress→update_objective, finish→co
📜 QUEST WORKFLOW:
1. create - Define a quest with objectives and rewards
2. assign - Character accepts the quest
3. update_objective - Track progress on objectives
3. update_objective - Track progress on objectives (requires characterId)
4. complete_objective - Mark objectives done
5. complete - Turn in quest for rewards
6. get_log - View character's quest journal`,
6. get_log - View character's quest journal

🎯 OBJECTIVE TYPES (for create):
Each objective requires a "type" field. Valid values:
- kill: defeat enemies
- collect: gather items
- deliver: bring an item to a destination
- explore: visit a location
- interact: talk to / interact with an entity
- custom: anything else (escape, escort, survive, etc.)`,
inputSchema: z.object({
action: z.string().describe(`Action: ${ACTIONS.join(', ')}`),
questId: z.string().optional().describe('Quest ID'),
Expand All @@ -534,7 +543,7 @@ Aliases: new→create, accept→assign, progress→update_objective, finish→co
description: z.string().optional().describe('Quest description'),
worldId: z.string().optional().describe('World ID'),
giver: z.string().optional().describe('Quest giver name'),
objectives: z.array(z.any()).optional().describe('Quest objectives'),
objectives: z.array(z.any()).optional().describe('Quest objectives. Each requires { description, type } where type is one of: kill, collect, deliver, explore, interact, custom'),
rewards: z.any().optional().describe('Quest rewards'),
prerequisites: z.array(z.string()).optional(),
status: z.string().optional(),
Expand Down
10 changes: 10 additions & 0 deletions tests/server/consolidated/quest-manage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ describe('quest_manage consolidated tool', () => {
expect(QuestManageTool.description).toContain('complete');
expect(QuestManageTool.description).toContain('get_log');
});

it('should document objective type enum values in description', () => {
for (const type of ['kill', 'collect', 'deliver', 'explore', 'interact', 'custom']) {
expect(QuestManageTool.description).toContain(type);
}
});

it('should document characterId requirement on update_objective', () => {
expect(QuestManageTool.description).toMatch(/update_objective.*characterId/i);
});
});

describe('create action', () => {
Expand Down
Loading
0