table_code
Generate statistical table code in R, Stata, or Python for descriptive, regression, correlation, and balance tables. Export to LaTeX, HTML, Word, or Markdown formats.
Instructions
결과표 생성 코드 (stargazer, esttab, pandas)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table_type | Yes | 표 유형 | |
| format | Yes | 출력 형식 | |
| language | Yes | 언어 |
Implementation Reference
- src/tools/index.ts:1677-1684 (handler)The handler function that executes the table_code tool. It is a placeholder implementation that echoes the input parameters and provides generic advice on table generation using tools like modelsummary (R), esttab (Stata), or stargazer.function handleTableCode(args: Record<string, unknown>) { return { table_type: args.table_type, format: args.format, language: args.language, code: "Table generation code - use modelsummary (R), esttab (Stata), or stargazer" }; }
- src/tools/index.ts:424-436 (schema)Input schema for the table_code tool defining the expected parameters: table_type (enum: descriptive, regression, correlation, balance), format (enum: latex, html, word, markdown), and language (enum: r, stata, python). All are required.inputSchema: { type: "object", properties: { table_type: { type: "string", enum: ["descriptive", "regression", "correlation", "balance"], description: "표 유형" }, format: { type: "string", enum: ["latex", "html", "word", "markdown"], description: "출력 형식" }, language: { type: "string", enum: ["r", "stata", "python"], description: "언어" }, }, required: ["table_type", "format", "language"], },
- src/tools/index.ts:422-437 (registration)Registration of the table_code tool in the tools array exported for MCP, including name, description, and reference to input schema.name: "table_code", description: "결과표 생성 코드 (stargazer, esttab, pandas)", inputSchema: { type: "object", properties: { table_type: { type: "string", enum: ["descriptive", "regression", "correlation", "balance"], description: "표 유형" }, format: { type: "string", enum: ["latex", "html", "word", "markdown"], description: "출력 형식" }, language: { type: "string", enum: ["r", "stata", "python"], description: "언어" }, }, required: ["table_type", "format", "language"], }, },
- src/tools/index.ts:842-843 (registration)Registration of the table_code handler in the main handleToolCall switch statement, mapping the tool name to its handler function.case "table_code": return handleTableCode(args);