Skip to main content
Glama

Perpetuus CRM

Search Contacts

crm_search_contacts
Read-onlyIdempotent

Search tenant-scoped contacts using CRM permissions. Supports quickSearch, Strapi filters, segment query, pagination and sort.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "crm_search_contacts"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo1-based page number.
sortNo
queryNoQuick search over name, email, phone, CPF and CNPJ.
filtersNoSafe Strapi filters. Prefer query for text search.
segmentNoEncoded segment filters accepted by GET /contacts.
pageSizeNoPage size capped at 100 for MCP performance.

Output Schema

NameRequiredDescriptionDefault
okYesAlways true on success; errors come with isError and no structuredContent.
dataYes
metaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / filters / additionalProperties / type
      Added value: +[
      +  "object",
      +  "array",
      +  "string",
      +  "number",
      +  "boolean",
      +  "null"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / properties / data / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "data": {
      -        "anyOf": [
      -          {
      -            "items": {
      -              "additionalProperties": true,
      -              "properties": {
      -                "createdAt": {
      -                  "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      -                },
      -                "customFields": {
      -                  "description": "Custom field values keyed by field slug."
      -                },
      -                "documentId": {
      -                  "description": "Strapi documentId (use it in other tools).",
      -                  "type": [
      -                    "string",
      -                    "null"
      -                  ]
      -                },
      -                "email": {
      -                  "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      -                },
      -                "id": {
      -                  "anyOf": [
      -                    {
      -                      "type": [
      -                        "string",
      -                        "number"
      -                      ]
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ]
      -                },
      -                "name": {
      -                  "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/documentId"
      -                },
      -                "owner": {},
      -                "phone": {
      -                  "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      -                },
      -                "team": {},
      -                "updatedAt": {
      -                  "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      -                }
      -              },
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Contacts in the current page."
      -      },
      -      "meta": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": true,
      -            "properties": {
      -              "pagination": {
      -                "additionalProperties": true,
      -                "properties": {
      -                  "page": {
      -                    "type": [
      -                      "number",
      -                      "null"
      -                    ]
      -                  },
      -                  "pageCount": {
      -                    "$ref": "#/properties/data/anyOf/0/properties/meta/anyOf/0/properties/pagination/properties/page"
      -                  },
      -                  "pageSize": {
      -                    "$ref": "#/properties/data/anyOf/0/properties/meta/anyOf/0/properties/pagination/properties/page"
      -                  },
      -                  "total": {
      -                    "$ref": "#/properties/data/anyOf/0/properties/meta/anyOf/0/properties/pagination/properties/page",
      -                    "description": "Total matching records (use pageSize=1 to count)."
      -                  }
      -                },
      -                "type": "object"
      -              }
      -            },
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "properties": {
      +      "data": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "additionalProperties": true,
      +              "properties": {
      +                "createdAt": {
      +                  "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      +                },
      +                "customFields": {
      +                  "description": "Custom field values keyed by field slug."
      +                },
      +                "documentId": {
      +                  "description": "Strapi documentId (use it in other tools).",
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                },
      +                "email": {
      +                  "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      +                },
      +                "id": {
      +                  "anyOf": [
      +                    {
      +                      "type": [
      +                        "string",
      +                        "number"
      +                      ]
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "name": {
      +                  "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/documentId"
      +                },
      +                "owner": {},
      +                "phone": {
      +                  "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      +                },
      +                "team": {},
      +                "updatedAt": {
      +                  "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Contacts in the current page."
      +      },
      +      "meta": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": true,
      +            "properties": {
      +              "pagination": {
      +                "additionalProperties": true,
      +                "properties": {
      +                  "page": {
      +                    "anyOf": [
      +                      {
      +                        "type": [
      +                          "number",
      +                          "string"
      +                        ]
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ]
      +                  },
      +                  "pageCount": {
      +                    "$ref": "#/properties/data/anyOf/0/properties/meta/anyOf/0/properties/pagination/properties/page"
      +                  },
      +                  "pageSize": {
      +                    "$ref": "#/properties/data/anyOf/0/properties/meta/anyOf/0/properties/pagination/properties/page"
      +                  },
      +                  "total": {
      +                    "$ref": "#/properties/data/anyOf/0/properties/meta/anyOf/0/properties/pagination/properties/page",
      +                    "description": "Total matching records (use pageSize=1 to count)."
      +                  }
      +                },
      +                "type": "object"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": true,
      +          "properties": {
      +            "data": {
      +              "anyOf": [
      +                {
      +                  "items": {
      +                    "additionalProperties": true,
      +                    "properties": {
      +                      "createdAt": {
      +                        "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      +                      },
      +                      "customFields": {
      +                        "description": "Custom field values keyed by field slug."
      +                      },
      +                      "documentId": {
      +                        "description": "Strapi documentId (use it in other tools).",
      +                        "type": [
      +                          "string",
      +                          "null"
      +                        ]
      +                      },
      +                      "email": {
      +                        "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      +                      },
      +                      "id": {
      +                        "anyOf": [
      +                          {
      +                            "type": [
      +                              "string",
      +                              "number"
      +                            ]
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      },
      +                      "name": {
      +                        "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/documentId"
      +                      },
      +                      "owner": {},
      +                      "phone": {
      +                        "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      +                      },
      +                      "team": {},
      +                      "updatedAt": {
      +                        "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/items/properties/name"
      +                      }
      +                    },
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "Contacts in the current page."
      +            },
      +            "meta": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": true,
      +                  "properties": {
      +                    "pagination": {
      +                      "additionalProperties": true,
      +                      "properties": {
      +                        "page": {
      +                          "type": [
      +                            "number",
      +                            "null"
      +                          ]
      +                        },
      +                        "pageCount": {
      +                          "$ref": "#/properties/data/anyOf/0/properties/meta/anyOf/0/properties/pagination/properties/page"
      +                        },
      +                        "pageSize": {
      +                          "$ref": "#/properties/data/anyOf/0/properties/meta/anyOf/0/properties/pagination/properties/page"
      +                        },
      +                        "total": {
      +                          "$ref": "#/properties/data/anyOf/0/properties/meta/anyOf/0/properties/pagination/properties/page",
      +                          "description": "Total matching records (use pageSize=1 to count)."
      +                        }
      +                      },
      +                      "type": "object"
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "meta": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "organizationDocumentId": {
      +          "description": "Organization documentId resolved from the credential.",
      +          "type": "string"
      +        },
      +        "requestId": {
      +          "description": "Request id (x-request-id or generated by the MCP server).",
      +          "type": "string"
      +        },
      +        "source": {
      +          "const": "perpetuus-crm-mcp",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "requestId",
      +        "source"
      +      ],
      +      "type": "object"
      +    },
      +    "ok": {
      +      "const": true,
      +      "description": "Always true on success; errors come with isError and no structuredContent.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "data",
      +    "meta"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered structurally. The description adds genuine value with 'tenant-scoped' and 'using CRM permissions', telling the agent results are permission-bounded rather than global. It says nothing about the 100-item page-size cap, truncation behavior, or result volume, which matter for a search tool.

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

Conciseness4/5

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

Two compact sentences, front-loaded with the operation and scope, with zero filler. The second sentence is a bare capability list rather than guidance, but nothing is wasted.

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

Completeness5/5

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

An output schema exists, so return values need not be described, and annotations carry the safety contract. For a six-parameter, zero-required read tool, the description plus the 83%-covered schema gives an agent enough to call it correctly; the main residual gap is sibling differentiation, which is a purpose issue rather than completeness.

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 83%, with per-field docs for page, query, segment, pageSize and filters, so the baseline is 3. The description only renames those concepts (quickSearch, Strapi filters, segment query, pagination, sort) without adding format or syntax detail, and sort has no schema description at all.

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?

States a specific verb and resource ('Search tenant-scoped contacts') and adds the notable scoping detail of CRM permissions. It does not, however, distinguish itself from the sibling crm_search_chat_contacts, which an agent could easily confuse with a contact search.

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 lists capabilities (quickSearch, Strapi filters, segment query) but gives no condition for choosing between the three overlapping search modes, no prerequisites, and no exclusions. Only the schema's 'Prefer query for text search' hints at routing, and that guidance lives outside the description.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.