Skip to main content
Glama

GenAIScript

Official
by microsoft
MIT License
43
2,820
  • Linux
  • Apple
system.fs_diff_files.genai.mts1.31 kB
system({ title: "File Diff Files", description: "Tool to compute a diff betweeen two files.", }) export default function (ctx: ChatGenerationContext) { const { defTool } = ctx defTool( "fs_diff_files", "Computes a diff between two different files. Use git diff instead to compare versions of a file.", { type: "object", properties: { filename: { type: "string", description: "Path of the file to compare, relative to the workspace.", }, otherfilename: { type: "string", description: "Path of the other file to compare, relative to the workspace.", }, }, required: ["filename"], }, async (args) => { const { context, filename, otherfilename } = args context.log(`fs diff ${filename}..${otherfilename}`) if (filename === otherfilename) return "" const f = await workspace.readText(filename) const of = await workspace.readText(otherfilename) return parsers.diff(f, of) }, { maxTokens: 20000, } ) }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/microsoft/genaiscript'

If you have feedback or need assistance with the MCP directory API, please join our Discord server