Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFileSchema ¶
func CreateFileSchema() *jsonschema.Schema
func GetFile ¶
func GetFile(ctx context.Context, req *mcp.CallToolRequest, params *GetFileParams, authKeeper auth.AuthKeeper) (*mcp.CallToolResult, any, error)
reads a file with the privileges of the systemd service
Types ¶
type FileMetadata ¶
type GetFileParams ¶
type GetFileParams struct {
Path string `json:"path" jsonschema:"Absolute path to the file"`
ShowContent bool `json:"show_content,omitempty" jsonschema:"Whether to show file content. Defaults to false."`
Offset int `json:"offset,omitempty" jsonschema:"Line offset for pagination. Defaults to 0."`
Limit int `json:"limit,omitempty" jsonschema:"Line limit for pagination. Defaults to 1000."`
}
type GetFileResult ¶
type GetFileResult struct {
Metadata *FileMetadata `json:"metadata"`
Entries []FileMetadata `json:"entries,omitempty"`
Content string `json:"content,omitempty"`
TotalLines int `json:"total_lines,omitempty"`
Offset int `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.