Skip to main content
Glama

zendesk_get_organization

Fetch a Zendesk organization's details, including custom fields and tags, by providing its ID. Returns JSON with key fields for integration purposes.

Instructions

Fetch a Zendesk organization including its custom fields and tags. Returns JSON with id, name, organization_fields, tags, created_at, updated_at.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organization_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler function 'zendesk_get_organization' that takes an organization_id (int) and returns JSON with id, name, organization_fields, tags, created_at, updated_at.
    def zendesk_get_organization(organization_id: int) -> str:
        """Fetch a Zendesk organization including its custom fields and tags. Returns JSON with id, name, organization_fields, tags, created_at, updated_at."""
        return _get_organization_data(organization_id)
  • Helper function '_get_organization_data' that performs the actual Zendesk API call using httpx to fetch organization data, handling errors and 404 cases.
    def _get_organization_data(organization_id: int) -> str:
        try:
            subdomain, token = get_oauth_session()
        except ConfigError as e:
            return str(e)
        url = f"https://{subdomain}.zendesk.com/api/v2/organizations/{organization_id}.json"
        try:
            response = httpx.get(url, headers={"Authorization": f"Bearer {token}"}, timeout=30)
            response.raise_for_status()
            org = response.json().get("organization", {})
            return json.dumps({
                "id": org.get("id"),
                "name": org.get("name"),
                "organization_fields": org.get("organization_fields"),
                "tags": org.get("tags"),
                "created_at": org.get("created_at"),
                "updated_at": org.get("updated_at"),
            }, indent=2)
        except Exception as e:
            if "404" in str(e):
                return f"Organization #{organization_id} not found or not accessible with current credentials."
            return f"Zendesk API error: {e}"
  • Registration of the organization tools via 'register_organization_tools(mcp)' call in the server's main() function.
    register_organization_tools(mcp)
  • Import of 'register_organization_tools' from the organizations module.
    from zendesk_mcp.tools.organizations import register_organization_tools
  • The tool's input schema is defined by the function signature: organization_id (int). Output is a string (JSON). Type hints serve as implicit schema.
    def zendesk_get_organization(organization_id: int) -> str:
        """Fetch a Zendesk organization including its custom fields and tags. Returns JSON with id, name, organization_fields, tags, created_at, updated_at."""
        return _get_organization_data(organization_id)
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It mentions the return format but omits permissions needed, error conditions, rate limits, or side effects. For a read operation, the main behavior (fetching data) is covered, but missing details reduce transparency.

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?

Two concise sentences with essential information front-loaded. Every part adds value: verb, resource, included fields, and return format. No unnecessary words.

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

Completeness4/5

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

Given the tool's simplicity (single parameter, read-only, output schema present), the description adequately covers the return structure and purpose. It lacks details like authentication or pagination but these are less critical for a straightforward fetch.

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

Parameters2/5

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

Schema description coverage is 0%, and the description does not elaborate on the 'organization_id' parameter beyond the schema's name and type. While the parameter is simple and self-explanatory, the low coverage requires compensation that is absent.

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

Purpose5/5

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

The description clearly states 'Fetch a Zendesk organization' with specific verb and resource. It lists included fields (custom fields, tags) and return format (JSON with id, name, etc.). The tool is unique among siblings as no other tool retrieves an organization.

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 (e.g., search tools for finding organizations by name). There is no mention of prerequisites or context, leaving the AI agent to infer usage independently.

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/michaelrice/zendesk-mcp'

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