# How to make buildkite-agent meta-data get "key" optional

**URL:** <https://forum.buildkite.community/t/how-to-make-buildkite-agent-meta-data-get-key-optional/2089>\
**Category:** General\
**Created:** [June 10, 2022, 3:42am UTC](https://forum.buildkite.community/t/how-to-make-buildkite-agent-meta-data-get-key-optional/2089 "2022-06-10T03:42:18Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [June 10, 2022, 3:46am UTC](https://forum.buildkite.community/t/how-to-make-buildkite-agent-meta-data-get-key-optional/2089/3 "2022-06-10T03:46:18Z")

</div>

Hey @Joe

Meta data is scoped to a build so if you are trying to access it from another build or pipeline, you need to pass the `--job` field to the command.  
There is also a `--default` field for the `get` operation that will be returned if the key does not exist.

You can check out more info in the docs on the meta-data command at [buildkite-agent meta-data v3 | Buildkite Documentation](https://buildkite.com/docs/agent/v3/cli-meta-data#getting-data-options)

---

_[View the full topic](https://forum.buildkite.community/t/how-to-make-buildkite-agent-meta-data-get-key-optional/2089)._
