<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tools on MCP Toolbox for Databases</title><link>/integrations/postgres/tools/</link><description>Recent content in Tools on MCP Toolbox for Databases</description><generator>Hugo</generator><language>en</language><atom:link href="/integrations/postgres/tools/index.xml" rel="self" type="application/rss+xml"/><item><title>postgres-database-overview</title><link>/integrations/postgres/tools/postgres-database-overview/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-database-overview/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-database-overview&lt;/code> fetches the current state of the PostgreSQL
server.&lt;/p>
&lt;p>&lt;code>postgres-database-overview&lt;/code> fetches the current state of the PostgreSQL server
This tool does not take any input parameters.&lt;/p>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p>

 &lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Source Name&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 
 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/postgres/">PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 

 
 
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/alloydb/">AlloyDB PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/cloud-sql-pg/">Cloud SQL for PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 &lt;/tbody>
 &lt;/table>
&lt;/div>
&lt;h2 id="example">Example&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">kind&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">tool&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">database_overview&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">type&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">postgres-database-overview&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">source&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">cloudsql-pg-source&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">description&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">|&lt;/span>&lt;span class="sd">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd"> fetches the current state of the PostgreSQL server. It returns the postgres version, whether it&amp;#39;s a replica, uptime duration, maximum connection limit, number of current connections, number of active connections and the percentage of connections in use.&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The response is a JSON object with the following elements:&lt;/p></description></item><item><title>postgres-execute-sql</title><link>/integrations/postgres/tools/postgres-execute-sql/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-execute-sql/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>A &lt;code>postgres-execute-sql&lt;/code> tool executes a SQL statement against a Postgres
database.&lt;/p>
&lt;p>&lt;code>postgres-execute-sql&lt;/code> takes one input parameter &lt;code>sql&lt;/code> and run the sql
statement against the &lt;code>source&lt;/code>.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Note:&lt;/strong> This tool is intended for developer assistant workflows with
human-in-the-loop and shouldn&amp;rsquo;t be used for production agents.&lt;/p>&lt;/blockquote>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p>

 &lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Source Name&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 
 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/postgres/">PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 

 
 
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/alloydb/">AlloyDB PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/cloud-sql-pg/">Cloud SQL for PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 &lt;/tbody>
 &lt;/table>
&lt;/div>
&lt;h2 id="example">Example&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">kind&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">tool&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">execute_sql_tool&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">type&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">postgres-execute-sql&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">source&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">my-pg-instance&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">description&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Use this tool to execute sql statement.&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="reference">Reference&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>field&lt;/strong>&lt;/th>
 &lt;th style="text-align: center">&lt;strong>type&lt;/strong>&lt;/th>
 &lt;th style="text-align: center">&lt;strong>required&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>type&lt;/td>
 &lt;td style="text-align: center">string&lt;/td>
 &lt;td style="text-align: center">true&lt;/td>
 &lt;td>Must be &amp;ldquo;postgres-execute-sql&amp;rdquo;.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>source&lt;/td>
 &lt;td style="text-align: center">string&lt;/td>
 &lt;td style="text-align: center">true&lt;/td>
 &lt;td>Name of the source the SQL should execute on.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>description&lt;/td>
 &lt;td style="text-align: center">string&lt;/td>
 &lt;td style="text-align: center">true&lt;/td>
 &lt;td>Description of the tool that is passed to the LLM.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table></description></item><item><title>postgres-get-column-cardinality</title><link>/integrations/postgres/tools/postgres-get-column-cardinality/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-get-column-cardinality/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-get-column-cardinality&lt;/code> tool estimates the number of unique values
(cardinality) for one or all columns in a specific PostgreSQL table by using the
database&amp;rsquo;s internal statistics.&lt;/p>
&lt;p>&lt;code>postgres-get-column-cardinality&lt;/code> returns detailed information as JSON about column
cardinality values, ordered by estimated cardinality in descending order. The tool takes
the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>schema_name&lt;/code> (required): The schema name in which the table is present.&lt;/li>
&lt;li>&lt;code>table_name&lt;/code> (required): The table name in which the column is present.&lt;/li>
&lt;li>&lt;code>column_name&lt;/code> (optional): The column name for which the cardinality is to be found.
If not provided, cardinality for all columns will be returned. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-active-queries</title><link>/integrations/postgres/tools/postgres-list-active-queries/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-active-queries/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-active-queries&lt;/code> tool retrieves information about currently
active queries in a Postgres database.&lt;/p>
&lt;p>&lt;code>postgres-list-active-queries&lt;/code> lists detailed information as JSON for currently
active queries. The tool takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>min_duraton&lt;/code> (optional): Only show queries running at least this long (e.g.,
&amp;lsquo;1 minute&amp;rsquo;, &amp;lsquo;1 second&amp;rsquo;, &amp;lsquo;2 seconds&amp;rsquo;). Default: &amp;lsquo;1 minute&amp;rsquo;.&lt;/li>
&lt;li>&lt;code>exclude_application_names&lt;/code> (optional): A comma-separated list of application
names to exclude from the query results. This is useful for filtering out
queries from specific applications (e.g., &amp;lsquo;psql&amp;rsquo;, &amp;lsquo;pgAdmin&amp;rsquo;, &amp;lsquo;DBeaver&amp;rsquo;). The
match is case-sensitive. Whitespace around commas and names is automatically
handled. If this parameter is omitted, no applications are excluded.&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of rows to return. Default: &lt;code>50&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-available-extensions</title><link>/integrations/postgres/tools/postgres-list-available-extensions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-available-extensions/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-available-extensions&lt;/code> tool retrieves all PostgreSQL
extensions available for installation on a Postgres database.&lt;/p>
&lt;p>&lt;code>postgres-list-available-extensions&lt;/code> lists all PostgreSQL extensions available
for installation (extension name, default version description) as JSON. The does
not support any input parameter.&lt;/p>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p>

 &lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Source Name&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 
 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/postgres/">PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 

 
 
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/alloydb/">AlloyDB PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/cloud-sql-pg/">Cloud SQL for PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 &lt;/tbody>
 &lt;/table>
&lt;/div>
&lt;h2 id="example">Example&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">kind&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">tool&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">list_available_extensions&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">type&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">postgres-list-available-extensions&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">source&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">postgres-source&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">description&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Discover all PostgreSQL extensions available for installation on this server, returning name, default_version, and description.&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="reference">Reference&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>name&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>default_version&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>address_standardizer&lt;/td>
 &lt;td>3.5.2&lt;/td>
 &lt;td>Used to parse an address into constituent elements. Generally used to support geocoding address normalization step.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>amcheck&lt;/td>
 &lt;td>1.4&lt;/td>
 &lt;td>functions for verifying relation integrity&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>anon&lt;/td>
 &lt;td>1.0.0&lt;/td>
 &lt;td>Data anonymization tools&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>autoinc&lt;/td>
 &lt;td>1.0&lt;/td>
 &lt;td>functions for autoincrementing fields&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table></description></item><item><title>postgres-list-database-stats</title><link>/integrations/postgres/tools/postgres-list-database-stats/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-database-stats/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-database-stats&lt;/code> lists the key performance and activity statistics for each PostgreSQL database in the instance, offering insights into cache efficiency, transaction throughput, row-level activity, temporary file usage, and contention.&lt;/p>
&lt;p>&lt;code>postgres-list-database-stats&lt;/code> lists detailed information as JSON for each database. The tool
takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>database_name&lt;/code> (optional): A text to filter results by database name. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>include_templates&lt;/code> (optional): Boolean, set to &lt;code>true&lt;/code> to include template databases in the results. Default: &lt;code>false&lt;/code>&lt;/li>
&lt;li>&lt;code>database_owner&lt;/code> (optional): A text to filter results by database owner. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>default_tablespace&lt;/code> (optional): A text to filter results by the default tablespace name. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>order_by&lt;/code> (optional): Specifies the sorting order. Valid values are &lt;code>'size'&lt;/code> (descending) or &lt;code>'commit'&lt;/code> (descending). Default: &lt;code>database_name&lt;/code> ascending.&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of databases to return. Default: &lt;code>10&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-indexes</title><link>/integrations/postgres/tools/postgres-list-indexes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-indexes/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-indexes&lt;/code> tool lists available user indexes in the database
excluding those in &lt;code>pg_catalog&lt;/code> and &lt;code>information_schema&lt;/code>.&lt;/p>
&lt;p>&lt;code>postgres-list-indexes&lt;/code> lists detailed information as JSON for indexes. The tool
takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>table_name&lt;/code> (optional): A text to filter results by table name. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>index_name&lt;/code> (optional): A text to filter results by index name. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>schema_name&lt;/code> (optional): A text to filter results by schema name. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>only_unused&lt;/code> (optional): If true, returns indexes that have never been used.&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of rows to return. Default: &lt;code>50&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-installed-extensions</title><link>/integrations/postgres/tools/postgres-list-installed-extensions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-installed-extensions/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-installed-extensions&lt;/code> tool retrieves all PostgreSQL
extensions installed on a Postgres database.&lt;/p>
&lt;p>&lt;code>postgres-list-installed-extensions&lt;/code> lists all installed PostgreSQL extensions
(extension name, version, schema, owner, description) as JSON. The does not
support any input parameter.&lt;/p>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p>

 &lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Source Name&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 
 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/postgres/">PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 

 
 
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/alloydb/">AlloyDB PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/cloud-sql-pg/">Cloud SQL for PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 &lt;/tbody>
 &lt;/table>
&lt;/div>
&lt;h2 id="example">Example&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">kind&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">tool&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">list_installed_extensions&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">type&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">postgres-list-installed-extensions&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">source&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">postgres-source&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">description&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">List all installed PostgreSQL extensions with their name, version, schema, owner, and description.&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="reference">Reference&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>field&lt;/strong>&lt;/th>
 &lt;th style="text-align: center">&lt;strong>type&lt;/strong>&lt;/th>
 &lt;th style="text-align: center">&lt;strong>required&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>type&lt;/td>
 &lt;td style="text-align: center">string&lt;/td>
 &lt;td style="text-align: center">true&lt;/td>
 &lt;td>Must be &amp;ldquo;postgres-list-active-queries&amp;rdquo;.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>source&lt;/td>
 &lt;td style="text-align: center">string&lt;/td>
 &lt;td style="text-align: center">true&lt;/td>
 &lt;td>Name of the source the SQL should execute on.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>description&lt;/td>
 &lt;td style="text-align: center">string&lt;/td>
 &lt;td style="text-align: center">true&lt;/td>
 &lt;td>Description of the tool that is passed to the LLM.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table></description></item><item><title>postgres-list-locks</title><link>/integrations/postgres/tools/postgres-list-locks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-locks/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-locks&lt;/code> tool displays information about active locks by joining pg_stat_activity with pg_locks. This is useful to find transactions holding or waiting for locks and to troubleshoot contention.&lt;/p>
&lt;p>This tool identifies all locks held by active processes showing the process ID, user, query text, and an aggregated list of all transactions and specific locks (relation, mode, grant status) associated with each process.&lt;/p>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-pg-settings</title><link>/integrations/postgres/tools/postgres-list-pg-settings/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-pg-settings/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-pg-settings&lt;/code> tool lists the configuration parameters for the postgres server, their current values, and related information.&lt;/p>
&lt;p>&lt;code>postgres-list-pg-settings&lt;/code> lists detailed information as JSON for each setting. The tool
takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>setting_name&lt;/code> (optional): A text to filter results by setting name. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of rows to return. Default: &lt;code>50&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p>

 &lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Source Name&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 
 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/postgres/">PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 

 
 
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/alloydb/">AlloyDB PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/cloud-sql-pg/">Cloud SQL for PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 &lt;/tbody>
 &lt;/table>
&lt;/div>
&lt;h2 id="example">Example&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">kind&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">tool&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">list_indexes&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">type&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">postgres-list-pg-settings&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">source&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">postgres-source&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">description&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">|&lt;/span>&lt;span class="sd">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd"> Lists configuration parameters for the postgres server ordered lexicographically, 
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd"> with a default limit of 50 rows. It returns the parameter name, its current setting,
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd"> unit of measurement, a short description, the source of the current setting (e.g.,
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd"> default, configuration file, session), and whether a restart is required when the
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd"> parameter value is changed.&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The response is a json array with the following elements:&lt;/p></description></item><item><title>postgres-list-publication-tables</title><link>/integrations/postgres/tools/postgres-list-publication-tables/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-publication-tables/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-publication-tables&lt;/code> tool lists all publication tables in the database.&lt;/p>
&lt;p>&lt;code>postgres-list-publication-tables&lt;/code> lists detailed information as JSON for publication tables. A publication table in PostgreSQL is a
table that is explicitly included as a source for replication within a publication (a set of changes generated from a table or group
of tables) as part of the logical replication feature. The tool takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>table_names&lt;/code> (optional): Filters by a comma-separated list of table names. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>publication_names&lt;/code> (optional): Filters by a comma-separated list of publication names. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>schema_names&lt;/code> (optional): Filters by a comma-separated list of schema names. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of rows to return. Default: &lt;code>50&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-query-stats</title><link>/integrations/postgres/tools/postgres-list-query-stats/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-query-stats/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-query-stats&lt;/code> tool retrieves query statistics from the
&lt;code>pg_stat_statements&lt;/code> extension in a PostgreSQL database. It provides detailed
performance metrics for executed queries.&lt;/p>
&lt;p>&lt;code>postgres-list-query-stats&lt;/code> lists detailed query statistics as JSON, ordered by
total execution time in descending order. The tool takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>database_name&lt;/code> (optional): The database name to filter query stats for. The input is
used within a LIKE clause. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code> (all databases).&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of results to return. Default: &lt;code>50&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-roles</title><link>/integrations/postgres/tools/postgres-list-roles/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-roles/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-roles&lt;/code> tool lists all the user-created roles in the instance, excluding system roles (like &lt;code>cloudsql%&lt;/code> or &lt;code>pg_%&lt;/code>). It provides details about each role&amp;rsquo;s attributes and memberships.&lt;/p>
&lt;p>&lt;code>postgres-list-roles&lt;/code> lists detailed information as JSON for each role. The tool
takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>role_name&lt;/code> (optional): A text to filter results by role name. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of roles to return. Default: &lt;code>50&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-schemas</title><link>/integrations/postgres/tools/postgres-list-schemas/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-schemas/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-schemas&lt;/code> tool retrieves information about schemas in a
database excluding system and temporary schemas.&lt;/p>
&lt;p>&lt;code>postgres-list-schemas&lt;/code> lists detailed information as JSON for each schema. The
tool takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>schema_name&lt;/code> (optional): A text to filter results by schema name. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>owner&lt;/code> (optional): A text to filter results by owner name. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of rows to return. Default: &lt;code>50&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-sequences</title><link>/integrations/postgres/tools/postgres-list-sequences/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-sequences/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-sequences&lt;/code> tool retrieves information about sequences in a
Postgres database.&lt;/p>
&lt;p>&lt;code>postgres-list-sequences&lt;/code> lists detailed information as JSON for all sequences.
The tool takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>sequence_name&lt;/code> (optional): A text to filter results by sequence name. The
input is used within a LIKE clause. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>schema_name&lt;/code> (optional): A text to filter results by schema name. The input is
used within a LIKE clause. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of rows to return. Default: &lt;code>50&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-stored-procedure</title><link>/integrations/postgres/tools/postgres-list-stored-procedure/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-stored-procedure/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-stored-procedure&lt;/code> tool queries PostgreSQL system catalogs (&lt;code>pg_proc&lt;/code>, &lt;code>pg_namespace&lt;/code>, &lt;code>pg_roles&lt;/code>, and &lt;code>pg_language&lt;/code>) to retrieve comprehensive metadata about stored procedures in the database. It filters for procedures (kind = &amp;lsquo;p&amp;rsquo;) and provides the full procedure definition along with ownership and language information.&lt;/p>
&lt;p>The tool returns a JSON array where each element represents a stored procedure with its schema, name, owner, language, complete definition, and optional description. Results are sorted by schema name and procedure name, with a default limit of 20 procedures.&lt;/p></description></item><item><title>postgres-list-table-stats</title><link>/integrations/postgres/tools/postgres-list-table-stats/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-table-stats/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-table-stats&lt;/code> tool queries &lt;code>pg_stat_all_tables&lt;/code> to provide comprehensive statistics about tables in the database. It calculates useful metrics like index scan ratio and dead row ratio to help identify performance issues and table bloat.&lt;/p>
&lt;p>The tool returns a JSON array where each element represents statistics for a table, including scan metrics, row counts, and vacuum history. Results are sorted by sequential scans by default and limited to 50 rows.&lt;/p></description></item><item><title>postgres-list-tables</title><link>/integrations/postgres/tools/postgres-list-tables/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-tables/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-tables&lt;/code> tool retrieves schema information for all or
specified tables in a Postgres database.&lt;/p>
&lt;p>&lt;code>postgres-list-tables&lt;/code> lists detailed schema information (object type, columns,
constraints, indexes, triggers, owner, comment) as JSON for user-created tables
(ordinary or partitioned). The tool takes the following input parameters: *
&lt;code>table_names&lt;/code> (optional): Filters by a comma-separated list of names. By
default, it lists all tables in user schemas.* &lt;code>output_format&lt;/code> (optional):
Indicate the output format of table schema. &lt;code>simple&lt;/code> will return only the
table names, &lt;code>detailed&lt;/code> will return the full table information. Default:
&lt;code>detailed&lt;/code>.&lt;/p></description></item><item><title>postgres-list-tablespaces</title><link>/integrations/postgres/tools/postgres-list-tablespaces/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-tablespaces/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-tablespaces&lt;/code> tool lists available tablespaces in the database.&lt;/p>
&lt;p>&lt;code>postgres-list-tablespaces&lt;/code> lists detailed information as JSON for tablespaces. The tool takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>tablespace_name&lt;/code> (optional): A text to filter results by tablespace name. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of tablespaces to return. Default: &lt;code>50&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p>

 &lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Source Name&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 
 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/postgres/">PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 

 
 
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/alloydb/">AlloyDB PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 

 
 &lt;tr>
 &lt;td>&lt;a href="/integrations/cloud-sql-pg/">Cloud SQL for PostgreSQL&lt;/a>&lt;/td>
 &lt;/tr>
 
 
 
 &lt;/tbody>
 &lt;/table>
&lt;/div>
&lt;h2 id="example">Example&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">kind&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">tool&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">list_tablespaces&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">type&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">postgres-list-tablespaces&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">source&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">postgres-source&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">description&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">|&lt;/span>&lt;span class="sd">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd"> Lists all tablespaces in the database. Returns the tablespace name,
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd"> owner name, size in bytes(if the current user has CREATE privileges on
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd"> the tablespace, otherwise NULL), internal object ID, the access control
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="sd"> list regarding permissions, and any specific tablespace options.&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The response is a json array with the following elements:&lt;/p></description></item><item><title>postgres-list-triggers</title><link>/integrations/postgres/tools/postgres-list-triggers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-triggers/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-triggers&lt;/code> tool lists available non-internal triggers in the
database.&lt;/p>
&lt;p>&lt;code>postgres-list-triggers&lt;/code> lists detailed information as JSON for triggers. The
tool takes the following input parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>trigger_name&lt;/code> (optional): A text to filter results by trigger name. The input
is used within a LIKE clause. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>schema_name&lt;/code> (optional): A text to filter results by schema name. The input
is used within a LIKE clause. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>table_name&lt;/code> (optional): A text to filter results by table name. The input is
used within a LIKE clause. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of triggers to return. Default: &lt;code>50&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-list-views</title><link>/integrations/postgres/tools/postgres-list-views/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-list-views/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-list-views&lt;/code> tool retrieves a list of top N (default 50) views from
a Postgres database, excluding those in system schemas (&lt;code>pg_catalog&lt;/code>,
&lt;code>information_schema&lt;/code>).&lt;/p>
&lt;p>&lt;code>postgres-list-views&lt;/code> lists detailed view information (schemaname, viewname,
ownername, definition) as JSON for views in a database. The tool takes the following input
parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>view_name&lt;/code> (optional): A string pattern to filter view names. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>schema_name&lt;/code> (optional): A string pattern to filter schema names. Default: &lt;code>&amp;quot;&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>limit&lt;/code> (optional): The maximum number of rows to return. Default: &lt;code>50&lt;/code>.&lt;/li>
&lt;/ul>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-long-running-transactions</title><link>/integrations/postgres/tools/postgres-long-running-transactions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-long-running-transactions/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-long-running-transactions&lt;/code> tool reports transactions that exceed a configured duration threshold by scanning &lt;code>pg_stat_activity&lt;/code> for sessions where &lt;code>xact_start&lt;/code> is set and older than the configured interval.&lt;/p>
&lt;p>The tool returns a JSON array with one object per matching session (non-idle). Each object contains the process id, database and user, application name, client address, session state, several age intervals (connection, transaction, query, and last activity), wait event info, and the SQL text currently associated with the session.&lt;/p></description></item><item><title>postgres-replication-stats</title><link>/integrations/postgres/tools/postgres-replication-stats/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-replication-stats/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>The &lt;code>postgres-replication-stats&lt;/code> tool queries pg_stat_replication to surface the status of connected replicas. It reports application_name, client address, connection and sync state, and human-readable lag sizes (sent, write, flush, replay, and total) computed using WAL LSN differences.&lt;/p>
&lt;p>This tool takes no parameters. It returns a JSON array; each element represents a replication connection on the primary and includes lag metrics formatted by pg_size_pretty.&lt;/p>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item><item><title>postgres-sql</title><link>/integrations/postgres/tools/postgres-sql/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/integrations/postgres/tools/postgres-sql/</guid><description>&lt;h2 id="about">About&lt;/h2>
&lt;p>A &lt;code>postgres-sql&lt;/code> tool executes a pre-defined SQL statement against a Postgres
database.
The specified SQL statement is executed as a &lt;a href="https://www.postgresql.org/docs/current/sql-prepare.html">prepared statement&lt;/a>,
and specified parameters will be inserted according to their position: e.g. &lt;code>$1&lt;/code>
will be the first parameter specified, &lt;code>$2&lt;/code> will be the second parameter, and so
on. If template parameters are included, they will be resolved before execution
of the prepared statement.&lt;/p>
&lt;h2 id="compatible-sources">Compatible Sources&lt;/h2>



&lt;div class="compatibility-section">
 &lt;p>This tool can be used with the following database sources:&lt;/p></description></item></channel></rss>