Fix: mcp change the naming to add from ingest

This commit is contained in:
Harshith Mullapudi 2025-06-25 21:20:42 +05:30
parent dec82742fa
commit b987a7cf3c
6 changed files with 9 additions and 10 deletions

View File

@ -1,4 +1,4 @@
VERSION=0.1.3
VERSION=0.1.6
# POSTGRES
POSTGRES_USER=docker

View File

@ -1,6 +1,6 @@
{
"name": "@redplanethq/core-mcp",
"version": "0.1.0",
"version": "0.1.3",
"type": "module",
"main": "dist/index.js",
"bin": {

View File

@ -31,8 +31,8 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
inputSchema: zodToJsonSchema(SearchKGSchema),
},
{
name: "ingest_memory",
description: "Ingest data into the memory graph pipeline",
name: "add_memory",
description: "Add data into the memory graph pipeline",
inputSchema: zodToJsonSchema(IngestKGSchema),
},
],
@ -51,7 +51,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
const result = await searchKnowledgeGraph(args);
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
}
case "ingest_memory": {
case "add_memory": {
const args = IngestKGSchema.parse(request.params.arguments);
const result = await ingestKnowledgeGraph(args);
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };

View File

@ -12,10 +12,10 @@ export async function searchKnowledgeGraph(args: SearchKG) {
export async function ingestKnowledgeGraph(args: IngestKG) {
const response = await axiosInstance.post(`/ingest`, {
data: args.data,
episodeBody: args.message,
source: process.env.SOURCE,
referenceTime: args.referenceTime,
sessionId: args.sessionId ? args.sessionId : undefined,
sessionId: undefined,
});
return response.data;
}

View File

@ -8,9 +8,8 @@ export const SearchKGSchema = z.object({
});
export const IngestKGSchema = z.object({
data: z.string().describe("The data to ingest in text format"),
message: z.string().describe("The data to ingest in text format"),
referenceTime: z.string().describe("The reference time in ISO format"),
sessionId: z.string().optional().describe("The session id of the conversation"),
});
export type SearchKG = z.infer<typeof SearchKGSchema>;

View File

@ -1,7 +1,7 @@
{
"name": "core",
"private": true,
"version": "0.1.5",
"version": "0.1.6",
"workspaces": [
"apps/*",
"packages/*"