Skip to content

Exercise 1.2: Advanced Tools, Structured Output clarifications/fixes #10

@kamranayub

Description

@kamranayub

My tests are passing so I completed the solution but a couple things confused me:

  1. Import of entryTagSchema but ends up not being used My bad, confusion due to point 2
  2. Comment on L369 add an outputSchema here with a tag that is a tagSchema and an entry that is an entrySchema
    • The solution diff shows { success, tagEntry } but its not clear what it should be based on comment (wrong schema and it says "entry" yet solution uses "tagEntry")
  3. The comment reference to videoSchema as if it were an imported schema; probably it should be clearer that this one is for us to derive from the output 😄

In this case actually, the tests seems to pass either way -- so not sure if that is good or not; it should probably validate we passed the right structure to catch the second point.

Proposed Fixes

  • On L369, update comment to: // 🐨 add an outputSchema here with a success boolean and a tagEntry that is an entryTagSchema
  • Update video schema comment to: // 🐨 add an outputSchema here with a video and output schema that includes videoUri (you're on your own here!)

Other Notes

For add_entry, it uses the entryWithTagsSchema schema... but in the implementation, the tags are added after creating the entry. So wouldn't there need to be code that either: a) refreshes/refetches the created entry or b) merges in the created tag entities onto the createdEntry object? Or is there some magic where createdEntry will contain tag entities in the array? I could test this in the MCP inspector 🤔

Edit: Yes, it doesn't quite work (notice created entry returns with 0 tags even though I added one)

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions