includeFullDoc: true in search endpoint

This commit is contained in:
Dhravya Shah 2025-08-26 15:33:51 -07:00
parent 1fb521ef72
commit c0c57a9fe9
2 changed files with 16 additions and 3 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@supermemory/ai-sdk",
"version": "1.0.3",
"version": "1.0.4",
"scripts": {
"build": "tsdown",
"dev": "tsdown --watch",

View file

@ -35,14 +35,27 @@ export function supermemoryTools(
informationToGet: z
.string()
.describe("Terms to search for in the user's memories"),
includeFullDocs: z
.boolean()
.optional()
.default(true)
.describe(
"Whether to include the full document content in the response. Defaults to true for better AI context.",
),
limit: z
.number()
.optional()
.default(10)
.describe("Maximum number of results to return"),
}),
execute: async ({ informationToGet }) => {
execute: async ({ informationToGet, includeFullDocs = true, limit = 10 }) => {
try {
const response = await client.search.execute({
q: informationToGet,
containerTags,
limit: 10,
limit,
chunkThreshold: 0.6,
includeFullDocs,
})
return {