@mastra/core
Version:
The core foundation of the Mastra framework, providing essential components and interfaces for building AI-powered applications.
26 lines (23 loc) • 479 B
JavaScript
;
// src/tools/tool.ts
var Tool = class {
id;
description;
inputSchema;
outputSchema;
execute;
mastra;
constructor(opts) {
this.id = opts.id;
this.description = opts.description;
this.inputSchema = opts.inputSchema;
this.outputSchema = opts.outputSchema;
this.execute = opts.execute;
this.mastra = opts.mastra;
}
};
function createTool(opts) {
return new Tool(opts);
}
exports.Tool = Tool;
exports.createTool = createTool;