Skip to main content
Glama

add_code_block

Insert code snippets into Apple Keynote slides by specifying slide number and code content, with optional positioning, font, and color customization.

Instructions

Add a code block to a slide

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slide_numberYesSlide number
codeYesCode content
xNoX coordinate in pixels (optional). Suggested for code: 100-200
yNoY coordinate in pixels (optional). Suggested for code: 250-350
font_sizeNoFont size (optional, default 14)
font_nameNoFont name (optional, default Monaco)
colorNoText color as 'r,g,b' with values 0-65535 (optional, e.g. '65535,65535,65535' for white)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Add' implies a mutation operation, but the description doesn't disclose whether this requires specific permissions, what happens if the slide doesn't exist, whether the addition is permanent or requires saving, or what the tool returns. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a tool with good schema documentation and gets straight to the point with zero waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 7 parameters and no annotations or output schema, the description is inadequate. It doesn't address behavioral aspects like error conditions, side effects, or return values. While the schema covers parameters well, the description fails to provide the contextual information needed for safe and effective use of this write operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description doesn't add any parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters, provide usage examples, or clarify edge cases. The baseline of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add') and target resource ('a code block to a slide'), making the purpose immediately understandable. It distinguishes this tool from siblings like add_text_box or add_bullet_list by specifying 'code block' as the content type. However, it doesn't explicitly differentiate from all possible siblings (e.g., it doesn't mention how it differs from add_build_in or add_builds_to_slide).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools for adding content to slides (add_text_box, add_bullet_list, add_quote, etc.), there's no indication of when a code block is appropriate versus other content types. It also doesn't mention prerequisites like needing an open presentation or specific slide context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/ByAxe/keynote-mcp'

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