Token size for contact sheet
This commit is contained in:
+6
-7
@@ -18,14 +18,14 @@ class Tool:
|
||||
# Import handlers from separate files
|
||||
from .read_image import handle as read_image_handler
|
||||
from .read_metadata import handle as read_png_metadata_handler
|
||||
from .list_thumbnails import handle as list_thumbnails_handler
|
||||
from .contact_sheet import handle as contact_sheet_handler
|
||||
from .list_directory import handle as list_directory_details_handler
|
||||
|
||||
# Central registry of all available tools
|
||||
TOOL_REGISTRY = [
|
||||
Tool(
|
||||
name="read_image",
|
||||
description="Reads an image from the disk and returns it as an image content object.",
|
||||
description="Reads an image from the disk and returns it as a full size image content object.",
|
||||
schema={
|
||||
"type": "object",
|
||||
"properties": {"path": {"type": "string", "description": "Path to the image file"}},
|
||||
@@ -44,23 +44,22 @@ TOOL_REGISTRY = [
|
||||
handler=read_png_metadata_handler
|
||||
),
|
||||
Tool(
|
||||
name="list_thumbnails",
|
||||
description="Generates a thumbnail grid of images in a directory. Supports pagination and sorting.",
|
||||
name="contact_sheet",
|
||||
description="Generates a high-density contact sheet of images in a directory, for low-token previews.",
|
||||
schema={
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"path": {"type": "string", "description": "Path to the directory containing images"},
|
||||
"page": {"type": "integer", "description": "The page number to retrieve (1-indexed)", "default": 1},
|
||||
"page_size": {"type": "integer", "description": "Number of images per page", "default": 64},
|
||||
"sort_by": {"type": "string", "description": "Sort order: 'mtime' (newest first, default), 'name' (alphabetical), or 'size' (largest first)", "default": "mtime"},
|
||||
},
|
||||
"required": ["path"],
|
||||
},
|
||||
handler=list_thumbnails_handler
|
||||
handler=contact_sheet_handler
|
||||
),
|
||||
Tool(
|
||||
name="list_directory",
|
||||
description="Lists the contents of a directory in a file browser format. Directories first, then files. Supports pagination and sorting.",
|
||||
description="Lists the contents of a directory in a simplified format. Directories first, then files. Supports pagination and sorting.",
|
||||
schema={
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user