Skip to main content
Glama

write_analysis_file

Save analysis code and results to a file for documentation and reuse in quantitative research workflows.

Instructions

분석 코드/결과를 파일로 저장

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes파일 내용
filenameYes파일명
directoryNo저장 디렉토리
encodingNo인코딩 (기본: utf-8)

Implementation Reference

  • The handler function for the 'write_analysis_file' tool. It extracts the content, filename, and directory from the input arguments and returns a response simulating file writing (notes that actual fs access is required).
    async function handleWriteAnalysisFile(args: Record<string, unknown>) { const content = args.content as string; const filename = args.filename as string; const directory = (args.directory as string) || "."; // Note: Actual file writing would require fs module return { status: "File writing capability - requires file system access", filename, directory, content_preview: content.substring(0, 200) + "..." }; }
  • The tool registration in the tools array, including the input schema defining parameters: content (string, required), filename (string, required), directory (string, optional), encoding (string, optional).
    name: "write_analysis_file", description: "분석 코드/결과를 파일로 저장", inputSchema: { type: "object", properties: { content: { type: "string", description: "파일 내용" }, filename: { type: "string", description: "파일명" }, directory: { type: "string", description: "저장 디렉토리" }, encoding: { type: "string", description: "인코딩 (기본: utf-8)" }, }, required: ["content", "filename"], }, },
  • The dispatch case in the handleToolCall switch statement that routes calls to the write_analysis_file tool to its handler function.
    case "write_analysis_file": return handleWriteAnalysisFile(args); case "create_project_structure":

Latest Blog Posts

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/seanshin0214/quantmaster-mcp-server'

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