Skip to main content
Glama

get_components_by_canvas

Retrieve components for a specific canvas in threat modeling to analyze security elements and relationships.

Instructions

Get components for a specific canvas

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
canvas_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_components_by_canvas' MCP tool. Decorated with @mcp.tool() for automatic registration and schema inference. It creates an API client instance and delegates to the client's get_components_by_canvas method, returning the result as a string.
    @mcp.tool()
    async def get_components_by_canvas(canvas_id: str) -> str:
        """Get components for a specific canvas"""
        async with create_client_from_env() as client:
            result = await client.get_components_by_canvas(canvas_id)
            return str(result)
  • Supporting API client method that performs the actual HTTP GET request to the Devici API endpoint /components/canvas/{canvas_id} to retrieve components for the given canvas ID.
    async def get_components_by_canvas(self, canvas_id: str) -> Dict[str, Any]:
        """Get all components for specific canvas."""
        return await self._make_request("GET", f"/components/canvas/{canvas_id}")
  • The @mcp.tool() decorator registers the function as an MCP tool named 'get_components_by_canvas', inferring input schema from parameters and docstring.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read operation ('Get') but doesn't specify if it's safe, requires permissions, has rate limits, or what the output entails. This is a significant gap for a tool with zero annotation coverage.

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 with no wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly without unnecessary elaboration.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter) and the presence of an output schema, the description is minimally adequate. However, with no annotations and low schema coverage, it lacks details on behavior and parameters, making it incomplete for optimal agent use.

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 0%, so the description must compensate. It mentions 'for a specific canvas', which hints at the 'canvas_id' parameter's purpose, adding some meaning beyond the bare schema. However, it doesn't detail format or constraints, leaving the parameter partially documented.

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

Purpose3/5

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

The description states the tool's purpose as retrieving components for a canvas, which is clear but vague. It uses a specific verb ('Get') and resource ('components'), but doesn't distinguish from sibling tools like 'get_component' or 'get_components', leaving ambiguity about scope or differences.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, exclusions, or compare to siblings like 'get_components' or 'get_component', leaving the agent to infer usage context without explicit direction.

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/geoffwhittington/devici-mcp'

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