You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conceptually, prompts and tools are very similar, i.e., a prompt is a tool that returns a list of messages.
However, the types of Prompts and Tools are unnecessarily different. Why not specify prompt parameters using JsonSchema as well.
If that goes to far, I'd like to be able to specify an inputType for a PromptArgument such that the UI for entering them can reflect their types.
export interface Prompt {
/**
The name of the prompt or prompt template. /
name: string;
/*
An optional description of what this prompt provides /
description?: string;
/*
A list of arguments to use for templating the prompt.
*/
arguments?: PromptArgument[];
}
export interface PromptArgument {
/**
The name of the argument. /
name: string;
/*
A human-readable description of the argument. /
description?: string;
/*
Whether this argument must be provided.
*/
required?: boolean;
}
export interface Tool {
/**
The name of the tool. /
name: string;
/*
A human-readable description of the tool. /
description?: string;
/*
A JSON Schema object defining the expected parameters for the tool.
*/
inputSchema: {
type: "object";
properties?: { [key: string]: object };
required?: string[];
};
}
The text was updated successfully, but these errors were encountered:
We discussed this a bit while designing prompts, and IIRC our main concern was supporting slash command style inputs (/myprompt foo bar), especially in CLIs, which is made harder if prompts accept complex types rather than just strings.
I think it's good if prompts can always support plain strings somehow, but maybe we can allow more structured types over the top if the client and server both support them. Maybe like <img> tag alt text?
Conceptually, prompts and tools are very similar, i.e., a prompt is a tool that returns a list of messages.
However, the types of Prompts and Tools are unnecessarily different. Why not specify prompt parameters using JsonSchema as well.
If that goes to far, I'd like to be able to specify an inputType for a PromptArgument such that the UI for entering them can reflect their types.
export interface Prompt {
/**
/
name: string;
/*
/
description?: string;
/*
*/
arguments?: PromptArgument[];
}
export interface PromptArgument {
/**
/
name: string;
/*
/
description?: string;
/*
*/
required?: boolean;
}
export interface Tool {
/**
/
name: string;
/*
/
description?: string;
/*
*/
inputSchema: {
type: "object";
properties?: { [key: string]: object };
required?: string[];
};
}
The text was updated successfully, but these errors were encountered: