MCPcopy Index your code
hub / github.com/codehamr/codehamr / ReadFileSchema

Function ReadFileSchema

internal/tools/read.go:35–53  ·  view source on GitHub ↗

ReadFileSchema is the OpenAI tool definition for read_file. The description nudges the model toward read_file over `cat` so it stops piping source through the shell just to look at it.

()

Source from the content-addressed store, hash-verified

33// nudges the model toward read_file over `cat` so it stops piping source
34// through the shell just to look at it.
35func ReadFileSchema() map[string]any {
36 return map[string]any{
37 "type": "function",
38 "function": map[string]any{
39 "name": ReadFileName,
40 "description": "Read a file and return its contents. Prefer this over `cat`/`sed` in bash for inspecting a file - no shell quoting, exact bytes. Output over 6k tokens is truncated to first+last 2k; for a slice of a large file use bash with sed/grep/head/tail.",
41 "parameters": map[string]any{
42 "type": "object",
43 "properties": map[string]any{
44 "path": map[string]any{
45 "type": "string",
46 "description": "Absolute or relative file path.",
47 },
48 },
49 "required": []string{"path"},
50 },
51 },
52 }
53}

Callers 2

buildToolsMethod · 0.92
TestReadFileSchemaShapeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestReadFileSchemaShapeFunction · 0.68