Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting this error: We are having trouble completing this action. Please try again shortly.

Akanksha Raj
May 15, 2026

What i am trying to do:
I have setup Oauth 2.0.
And, I am getting an atlassian_access_token. : eyJraWQiOiJhdXRoLm.... teFTvct2NJ8XaMW9

I am using this token to connect to mcp_server.

 

from langchain_mcp_adapters.client import MultiServerMCPClient
    mcp_client = MultiServerMCPClient(
        {
            "atlassian": {
                "url": "https://mcp.atlassian.com/v1/mcp",
                "transport": "streamable_http",
                "headers": {
                    "Authorization": f"Bearer {atlassian_access_token}",
                },
            }
        }
    )
tools = await mcp_client.get_tools()

Then, I am getting a list of tools:
Loaded 39 tools from MCP client: ['atlassianUserInfo', 'getAccessibleAtlassianResources', 'getConfluencePage', 'searchConfluenceUsingCql', ....... 'search', 'fetch']


After this I am invoking an agent with these set of tools:
   #model = "azure_openai:gpt-5-mini"
    model_instance = init_chat_model(runtime.context.model, output_version="responses/v1")

    # Create the agent with runtime-loaded tools
    agent = create_agent(
        model=model_instance,
        tools=tools,
        system_prompt=ATLASSIAN_AGENT_SYSTEM_PROMPT,
        context_schema=AtlassianAgentContext
    )
    result = await agent.ainvoke({"messages": state["messages"]})

    return {"messages": result["messages"]}
Then, in return I am getting:
{"error":true,"message":"We are having trouble completing this action. Please try again shortly."}
Is there anything wrong with my approach?

1 comment

Comment

Log in or Sign up to comment
Dilip Venkatesh
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 15, 2026

Hey, Can you please run some diagnosis steps?

1. Call getAccessibleAtlassianResources directly using inspector or any other agent using the same token (not via agent) to confirm your token works and get valid cloud IDs
2. Check which tool the agent is actually trying to invoke when the error occurs. the error message is generic but the agent's intermediate steps will tell you
3. Verify your scopes and target resources in your JWT token (access token)

Akanksha Raj
May 17, 2026

1. I am getting valid cloud ID using the access token generated through OAuth flow.
API CALL:

    headers = {"Authorization": f"Bearer {token}"}
response = requests.get(url, headers=headers)
resources = response.json()
print(json.dumps(resources, indent=2))

=> response i am getting:

[
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"url": "https://xxx-xxxxxxxxxxxxx.atlassian.net",
"name": "xxx-xxxxxxxxxxxxx",
"scopes": [
"read:confluence-content.all",
"read:confluence-space.summary",
"search:confluence"
],
"avatarUrl": "https://site-admin-avatar....."
}
]

Akanksha Raj
May 17, 2026

3. This is my decoded token:
Decoded Header:
{
"kid": "auth.atlassian.com-ACCESS-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"alg": "RS256"
}

 

Decoded Payload:
{
"jti": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"sub": "xxxxx:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"nbf": xxxxxxxxxx,
"iss": "https://auth.atlassian.com",
"iat": 1779070499,
"exp": 1779074099,
"aud": "xxxxxxxxxxxxxxxxxxxx.....",
"https://atlassian.com/authProfile": "oauth.ecosystem.oauthIntegration",
"https://id.atlassian.com/atl_token_type": "ACCESS",
"https://id.atlassian.com/orgId": "a53d6b63-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"https://atlassian.com/orgId": "a53d6b63-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"https://atlassian.com/firstParty": false,
"https://id.atlassian.com/ujt": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"https://atlassian.com/verified": true,
"https://atlassian.com/oauthClientId": "xxxxxxxxxxxx........",
"https://id.atlassian.com/session_id": "xxxxxxxx.....",
"verified": "true",
"https://atlassian.com/systemAccountId": "xxxxxxxxxx........",
"https://id.atlassian.com/processRegion": "us-west-2",
"https://atlassian.com/emailDomain": "xxxxx.com",
"https://atlassian.com/3lo": true,
"client_id": "xxxxxxxxxxx...",
"https://atlassian.com/accountType": "atlassian",
"https://id.atlassian.com/refresh_chain_id": "xxxxxxxxxxxx",
"https://id.atlassian.com/verified": true,
"scope": "offline_access read:confluence-content.all read:confluence-space.summary read:jira-user read:jira-work search:confluence write:jira-work",
"https://atlassian.com/systemAccountEmailDomain": "connect.atlassian.com",
"https://id.atlassian.com/rti": "xxxxxxxxxxxx",
"https://atlassian.com/systemAccountEmail": "xxxxxxxxx@connect.atlassian.com"
}

Akanksha Raj
May 17, 2026

I invoked this tool directly: 

getAccessibleAtlassianResources
from langchain_mcp_adapters.client import MultiServerMCPClient
    atlassian_mcp_url = os.getenv("ATLASSIAN_MCP_URL", "https://mcp.atlassian.com/v1/mcp")

    # Initialize MCP client with OAuth token
    mcp_client = MultiServerMCPClient(
        {
            "atlassian": {
                "url": atlassian_mcp_url,
                "transport": "streamable_http",
                "headers": {
                    "Authorization": f"Bearer {atlassian_token}",
                },
            }
        }
    )
tools = await mcp_client.get_tools()
tools = [tool for tool in tools if tool.name.startswith("getAccessibleAtlassianResources")]
print(f"Loaded {len(tools)} tools from MCP client: {[tool.name for tool in tools]}")
#-----------------------------------------
resource_tool = next((t for t in tools if t.name == "getAccessibleAtlassianResources"), None)
 if resource_tool:
      print("\n>>> Directly invoking getAccessibleAtlassianResources...")
      try:
          resource_result = await resource_tool.ainvoke({})
          print(">>> getAccessibleAtlassianResources result:")
          print(resource_result)
      except Exception as e:
          print(f">>> getAccessibleAtlassianResources FAILED: {e}")
  else:
      print(">>> getAccessibleAtlassianResources tool not found in loaded tools")
#--------------------------------------------------------------
=> response:
Loaded 1 tools from MCP client: ['getAccessibleAtlassianResources']
>>> Directly invoking getAccessibleAtlassianResources...
>>> getAccessibleAtlassianResources FAILED: {"error":true,"message":"We are having trouble completing this action. Please try again shortly."}
Akanksha Raj
May 17, 2026

@Dilip Venkatesh Can you please look into this? I have provided detailed report for the diagnosis. Kindly go through all three.


Akanksha Raj
May 17, 2026

Full traceback:

 

>>> Exception type: ToolException
>>> Exception message: {"error":true,"message":"We are having trouble completing this action. Please try again shortly."}
>>> Exception args: ('{"error":true,"message":"We are having trouble completing this action. Please try again shortly."}',)
>>> e.args: ('{"error":true,"message":"We are having trouble completing this action. Please try again shortly."}',)
>>> Full traceback:
Traceback (most recent call last):
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\atlassian_agent.py", line 216, in call_model
resource_result = await resource_tool.ainvoke({})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_core\tools\structured.py", line 70, in ainvoke
return await super().ainvoke(input, config, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_core\tools\base.py", line 652, in ainvoke
return await self.arun(tool_input, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_core\tools\base.py", line 1131, in arun
raise error_to_raise
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_core\tools\base.py", line 1097, in arun
response = await coro_with_context(coro, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_core\tools\structured.py", line 124, in _arun
return await self.coroutine(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_mcp_adapters\tools.py", line 414, in call_tool
return _convert_call_tool_result(call_tool_result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\akanksha.c.raj\Desktop\akanksha\xxxx\xxx\atlassian-ui\backend\.venv\Lib\site-packages\langchain_mcp_adapters\tools.py", line 189, in _convert_call_tool_result
raise ToolException(error_msg)
langchain_core.tools.base.ToolException: {"error":true,"message":"We are having trouble completing this action. Please try again shortly."}

Dilip Venkatesh
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 18, 2026

@Akanksha Raj 

The token looks good and has the right scopes.

1. I am getting valid cloud ID using the access token generated through OAuth flow.
API CALL

What I meant is to use the MCP url in https://modelcontextprotocol.io/docs/tools/inspector or any MCP client and use the same oAuth token and test calling any of the tools.

I suspect, it has something to do with the code you have written and not the token/server itself.

I'm not familiar with the client you are using, so I cannot help much here.

Akanksha Raj
May 18, 2026

What I am using here is : 

from langchain_mcp_adapters.client import MultiServerMCPClient

https://reference.langchain.com/python/langchain-mcp-adapters/client/MultiServerMCPClient

And, this is an MCP Client. And, I have already pasted the code that I used.

Akanksha Raj
May 18, 2026

Is there anyone else from the Atlassian Team who can help me with this?

OR

Anyone from this community?

TAGS
AUG Leaders

Atlassian Community Events