# listProcedures

Source: https://dbmcp.haymon.ai/tools/list-procedures/

List stored procedures on MySQL, MariaDB, or PostgreSQL, with name search and optional details

List user-defined stored procedures in a database, optionally filtered by `search` substring and/or expanded with `detailed: true`. Available on MySQL/MariaDB and PostgreSQL (`public` schema, PostgreSQL 11+). Not available for SQLite. Results are paginated — see [Cursor Pagination](/features/pagination#cursor-pagination) for the protocol. The `search` value (case-insensitive `LIKE`/`ILIKE` substring; `%` matches any sequence, `_` a single character) must remain identical across paginated calls for cursor continuity.

In **brief mode** (default) the response is a sorted JSON array of procedure-name strings. PostgreSQL overloads appear as one entry per overload — duplicate name strings are expected:

```json
{
  "entries": ["archive_order", "archive_order_history", "archive_order_history"]
}
```

In **detailed mode** the response is keyed by procedure signature. The PostgreSQL payload disambiguates overloads via `name(arguments)`; zero-arg procedures key as `name()` for shape uniformity:

```json
{
  "entries": {
    "archive_order(order_id integer)": {
      "schema": "public",
      "name": "archive_order",
      "language": "plpgsql",
      "arguments": "order_id integer",
      "security": "INVOKER",
      "owner": "app_user",
      "description": "Moves an order into the archive table",
      "definition": "CREATE OR REPLACE PROCEDURE public.archive_order(order_id integer) ..."
    }
  }
}
```

The detailed-mode field set diverges per backend:

- **PostgreSQL** — keyed by `name(arguments)` (overloads disambiguate; zero-arg procedures key as `name()`). Each value carries `schema`, `name`, `language`, `arguments`, `security` (`INVOKER` / `DEFINER`), `owner`, `description` (or `null` when no `COMMENT ON PROCEDURE`), and `definition` (the full `pg_get_functiondef` output for `prokind='p'`). Brief and detailed pages share the same `(proname, oid)` row order, so a client can switch `detailed` mid-pagination without losing position. The `listFunctions`-only fields `returnType`, `volatility`, `strict`, and `parallelSafety` are absent — procedures don't return a value, `pg_proc.provolatile`/`proisstrict` are not user-settable for procedures, and `proparallel` carries no procedure-level guarantee.
- **MySQL / MariaDB** — keyed by bare procedure name (the engines do not allow procedure overloading). Each value carries `schema`, `language` (typically `"SQL"`; MariaDB external-language procedures report the external language name), `arguments` (comma-separated `MODE name type` triples from `information_schema.PARAMETERS` where `MODE` is `IN`/`OUT`/`INOUT`; empty string for zero-parameter procedures), `deterministic` (boolean), `sqlDataAccess` (`CONTAINS_SQL` / `NO_SQL` / `READS_SQL_DATA` / `MODIFIES_SQL_DATA`), `security` (`INVOKER` / `DEFINER`), `definer` (`user@host`), `description` (or `null` when no `COMMENT`), `definition` (canonical reconstructed `CREATE PROCEDURE` text including `DEFINER=` in `` `user`@`host` `` form; no `RETURNS` clause), plus the session context active at procedure-creation time: `sqlMode`, `characterSetClient`, `collationConnection`, `databaseCollation`. `returnType` is absent (procedures have no return type); `volatility`, `parallelSafety`, and `strict` are absent (no MySQL/MariaDB analogues). `owner` is renamed to `definer` to match the engine's terminology.