get_portfolio_functions_and_legislation
Returns the matters a portfolio deals with (its functions) and the legislation it administers, from the Administrative Arrangements Order in force today.
| Fact | Value |
|---|---|
| Tool | get_portfolio_functions_and_legislation |
| Partner scope required | graph:read |
| Subscriber tier required | AI Pro |
Accepts as_at | no |
Parameters
| Name | Type | Required | Default |
|---|---|---|---|
portfolio_name | string | yes | |
response_format | string | no | "concise" |
function_id | string | no | null |
limit | integer | no | 25 |
cursor | string | no | null |
Notes
portfolio_nameis matched against part of the department's name, for example "Attorney-General".resultis the legislation the Order allocates to the portfolio, paged withlimit(default 25, at most 100) andpage.next_cursor.page.totalis how many titles the portfolio administers.functionslists each function's text as the Order prints it.- No legislation is listed per function. The Order allocates legislation to the portfolio as a whole, not to its functions.
function_idandresponse_format: "detailed", which listed legislation per function by text similarity, were withdrawn on 10 October 2026 and are refused withINVALID_ARGUMENT. - Law in force today only.
Request (get_portfolio_functions_and_legislation with {"portfolio_name":"Attorney-General","limit":3})
Python SDK
import asyncio, os
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main():
headers = {"Authorization": f"Bearer {os.environ['LAWATLAS_API_KEY']}"}
async with streamablehttp_client("https://advisor.lawatlas.ai/api/mcp-http/mcp", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.call_tool("get_portfolio_functions_and_legislation", {
"portfolio_name": "Attorney-General",
"limit": 3
})
print(result.content[0].text)
asyncio.run(main())
curl
curl -s https://advisor.lawatlas.ai/api/mcp-http/mcp \
-H "Authorization: Bearer $LAWATLAS_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_portfolio_functions_and_legislation","arguments":{"portfolio_name":"Attorney-General","limit":3}}}'
Response, as Advisor returned it on 10 October 2026. The tool's result is the JSON text of result.content[0].text; lists and long text are trimmed where marked "...".
{
"schema_version": "3.5",
"result": [
{
"legislation_id": "bcdba95d-49cd-4209-9640-8f31b88f738a",
"title": "Crimes (Ships and Fixed Platforms) Act 1992",
"short_title": "Crimes (Ships and Fixed Platforms) Act",
"aao_legislation_title": "Crimes (Ships and Fixed Platforms) Act 1992"
},
{
"legislation_id": "a1238d1c-ff8b-44a2-996e-e31e263f4044",
"title": "Parliamentary Papers Act 1908",
"short_title": "Parliamentary Papers Act",
"aao_legislation_title": "Parliamentary Papers Act 1908"
},
{
"legislation_id": "225fb3da-e124-4aa3-b3c5-293f439ae5b1",
"title": "Crimes at Sea Act 2000",
"short_title": "Crimes at Sea Act",
"aao_legislation_title": "Crimes at Sea Act 2000"
}
],
"page": {
"returned": 3,
"total": 1666,
"next_cursor": "eyJvIjogM30=",
"truncated": false,
"limit_requested": 3,
"limit_applied": 3
},
"portfolio_name": "Attorney-General's Department",
"functions": [
{
"topic_id": "ccf8a68c-08d0-4c1c-8877-5c5136b1694b",
"sequence": 1,
"text": "1: Law and justice including -"
},
{
"topic_id": "f6444c9a-29d6-48f6-96d0-b3daf4e8e6b0",
"sequence": 2,
"text": "2: Administrative law"
},
{
"topic_id": "8b935e5f-fd60-4126-8d3f-e7adb2a1bb97",
"sequence": 3,
"text": "3: Alternative dispute resolution"
},
"... 24 more"
],
"notes": [
"The Order allocates this legislation to the portfolio as a whole; it does not allocate legislation to individual functions."
],
"usage": "Functions and legislation under the Administrative Arrangements Order currently in force."
}
Errors
| Code | Meaning | What to do |
|---|---|---|
INVALID_ARGUMENT | function_id or response_format: "detailed" was passed; both are withdrawn | Call with portfolio_name alone |
NOT_FOUND | No portfolio in the current Order matches | Check the name against the portfolios list_hansard_filters or get_portfolio_rankings return |